In our lungs, airways branch repeatedly, and end in tiny air sacs lined with blood vessels. When we inhale, fresh oxygen‑rich air flows into the lungs, and some of the oxygen enters the blood. When we exhale, air leaves the lungs by the same path, carrying off carbon dioxide waste released from the blood.
But that's not the way breathing works in all animals with lungs.
In birds, air flows right through the lungs in one direction through a system of tubes. Outside the lungs, it moves in a circular pathway involving large air sacs and valves that keep it flowing one way. After completing the circuit, air flows back out through the trachea, just like it does for us.
Powered flight takes lots of energy, so birds need lots of oxygen. The bird lung must have evolved this special way of breathing to improve efficiency and meet these needs.
That's what biologists used to think, but it turns out not to be so.
Because biologists found one‑way air flow in the lungs of alligators in 2010, and savannah monitor lizards and iguanas in 2014, none of which fly. Bats evolved flight separately from birds, but didn't evolve one‑way air flow in their lungs.
But none of the reptiles with one‑way air flow has the ravenous oxygen needs of birds. They aren't warm‑blooded animals, and alligators and iguanas don't even have particularly good aerobic capacity.
Instead of being a specialization for getting more oxygen, one‑way air flow is probably just another way of breathing. It probably evolved 300 million years ago in the common ancestors of lizards, snakes, crocodiles and dinosaurs, including birds.
"Avian Respiration" (Dr. Gary Ritchison) Eastern Kansas University
"The Avian Respiratory System" (Kelly Kage)
"What Disco Fog Taught Us About Iguana Lungs, Phenomena: Not Exactly Rocket Science" (National Geographic)
"Why Lizards Have Bird Breath: Iguanas Evolved One‑Way Lungs surprisingly Like Those Of Birds" (Science Daily)