Oxygen is usually 21% in all layers of the atmosphere.
When we go to high mountains, we have difficulties in breathing. It is not because of the low percentage of oxygen, but is due to the low pressure of air.
Therefore, when the diaphragm flattens to lower the air pressure in rib cage, the air pressure outside is to low that air can't get into the lungs easily.