Air in the atmosphere is not the same at all levels. It is more dense near the earth. It goes on thinning out as we go up. So, there being more air near the earth, there is more air pressure. As the amount of air goes on decreasing, its weight and the air pressure goes on decreasing consequently.