Why does exhaled air still contain oxygen?
You seem to be confused about diffusion versus bulk flow of fluid (air/gas).
In the lungs, there is diffusion between blood and the gas in the lungs. There is sufficient surface area that these equilibrate fairly quickly, and the partial pressure of oxygen in blood leaving the lungs is very similar to the gas in the lungs. Partial pressures are the best way to understand and explain diffusion of gases.
When you breathe out, a fraction of the bulk air moves out and mixes with outside gas. The partial pressures don't matter for this part, however, all that matters is that you have a big opening (as far as a gas is concerned) through the mouth/nose. Then again, when you breathe in, a fraction of bulk external air moves in and mixes with gas that remained in the lungs (you never completely breathe it out). This mixture will initially have more oxygen in it than the mixture that was exhaled, but it again quickly equilibrates with the blood via diffusion.
If you were to breathe in and wait long enough, eventually the partial pressure of oxygen in the blood would drop (used up in metabolism), and the concentration in the lung gas would also drop to match. However, you would lose consciousness far far before this would ever approach &quot;zero&quot;.
The lungs are not a machine to pull all the oxygen molecules out of the air and provide it to the body. They are a gas-exchange surface to provide a massive surface area to help make the internal oxygen concentration as close as is possible to the external oxygen concentration. It never quite gets there, of course, but it gets relatively close.