And, by the way, it is mostly CO 2. Every gas consists of molecules or atoms moving at random.

That’s why light molecules are rare in our atmosphere, in contrast to their abundance in the universe at large. Also, a vacuum does not suck. Gravity keeps the atmosphere bound to earth. The air at the bottom of the atmosphere is under a lot more weight than the air nearer the top.

Why is space a vacuum? Like the acrobat at the bottom of a stack of acrobats, the air at the bottom of the atmosphere is under a lot more weight than the air nearer the top. This question was originally answered on Quora by M. Scott Veach. Also, why isn't the air from the Earth escaping due to the vacuum in space? The light atoms are more likely to reach escape velocity and escape to space. Why can't the atmosphere of gas giant planets escape into space? Mars’ atmosphere is only about 1/100th as dense as Earth’s. If space is a vacuum then why doesn't it suck in all the air from Earth's atmosphere? Occasionally they collide with each other or with the walls of any container.