Answer: In the upper atmosphere, the air is less dense, molecules are less and scattering, so the pressure also is less. It is known that the pressure decreases with height and the force of gravity also is less at higher altitudes than at the sea level. Near the surface of the earth, the air molecules are closely attached with one another, thereby increasing its density.
So the air is comparatively thin at the higher elevation, thereby maintaining a balance between the upper and the lower atmosphere.