system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: why do some birds fold their wings during flight?

since i was a child i always wondered why some small birds flap their wings, then fold them, then flap again and fold again and so on. Is it more efficient? If so why don't all birds do it?
gpt
Every flying object has a most efficient airspeed defined by its geometry. For small birds, this airspeed has to be high enough to efficiently escape a predator when attacked. As an attack is a very selective event, the aerodynamics are optimized to high speed escapes. Now when cruising at a significantly lower speed, the aerodynamic efficiency is very low (because far away from the optimized speed); cruising at a higher, more efficient speed, would be too exhaustive to sustain for more than a few seconds. As a result, the bird switches about every second between high speed flight (efficient) and not flying at all to fly at cruising speed on average. Larger birds don't have to escape predators as often, and do to aerodynamic effects, most efficient speed  and biologically sustainable cruising speed are closer to each other.