Getting enough oxygen into your blood and enough carbon dioxide out of it, fast enough to keep you alive, isn't a problem that can be solved with a big open cavity the size of your chest. Gas exchange happens by diffusion across a membrane, and diffusion is slow relative to how much gas a resting or active body needs moved every minute — the only way to make it fast enough is to maximise the surface area the exchange happens across. Your lungs solve that problem with repeated branching, splitting the airway again and again into smaller tubes until the total surface area folded into your chest is often described as roughly comparable to a tennis court, despite fitting inside a ribcage barely bigger than a large loaf of bread.
Branching multiplies surface area far faster than it uses up space
Air entering through the trachea passes into two main bronchi, one for each lung, and from there the airway divides again and again — each generation of branching roughly halving in diameter while roughly doubling in number, a pattern that continues for over twenty successive branching generations before ending in millions of tiny air sacs called alveoli. Each individual branch and alveolus is small, but the branching structure means the total surface area across all of them, added together, is vastly larger than the surface area of a single large cavity of the same overall volume would ever provide — a simple geometric property of repeated branching that biology exploits to squeeze an enormous gas-exchange surface into a chest cavity that has to remain small enough to fit inside a ribcage and be moved by breathing muscles many times a minute for an entire lifetime.
A thin membrane is what actually makes fast exchange possible
Surface area alone wouldn't be enough if the barrier gas had to cross were thick; the alveolar walls, where actual gas exchange with the surrounding capillary blood vessels happens, are only one cell layer thick on each side, keeping the diffusion distance between air and blood as short as physically practical. That combination — an enormous total surface area from branching, paired with an extremely thin exchange membrane — is what lets a resting adult move several litres of air in and out of the lungs every minute, with gas exchange happening fast enough across that surface to keep blood oxygen levels stable even during sustained physical exertion, when the body's oxygen demand can rise many times over its resting level.
What we're still unsure about
The branching structure of the airway and the thinness of the alveolar exchange membrane are well established anatomical and physiological facts, described consistently across respiratory physiology. The often-cited comparison of total alveolar surface area to a tennis court is a widely used teaching approximation rather than a single precisely measured constant — actual estimates in the physiology literature vary meaningfully between individuals and measurement methods, generally landing somewhere in a broad range rather than one exact figure, so it's worth treating that comparison as an illustrative order-of-magnitude description rather than a precise anatomical measurement.
This sits inside Respiratory Anatomy, one of seven topics in Anatomy, one of four domains in Medicine, one of seventeen subjects the app can quiz you on.