Birds don’t chew, and as you can see this can appear pretty risky, but (usually) they know what they’re doing!
Birds have some pre-stomach food storage called a crop. This lets them stuff their faces in risky areas before retreating somewhere safe to digest. You may have seen this when birds swarm feeders at dusk in the winter to fill up so they have calories to sustain them through the long, cold night.
From the crop, food goes to the inhospitable proventriculus, where VERY potent stomach acid dissolves food. Shrikes (awesome predatory songbirds known as “butcherbirds”) can digest a whole mouse in three hours! Next is the gizzard, where strong muscles grind the food, often with the help of small ingested rocks. Then the small intestine extracts as many nutrients as possible from the food before reclaiming water from the large intestine. Finally, it reaches the cloaca, the opening where digestive, urinary, and reproductive systems all meet for excretion (and, as you’ve seen, occasionally becomes a fecal sac snack!).
Feathers can actually give a snapshot of the bird’s nutrition at the time of growth, and a small sample can tell us a lot. For example, nutritional stress can appear in stress hormones deposited in the feathers. Amounts of deuterium (the heavy isotope of hydrogen) can tell us roughly where the bird came from based how it’s distributed in freshwater around the world. Birds may even be able to detoxify their body tissues of toxins, like mercury, by concentrating it in their feathers!