If the temperature is warm enough, atoms and molecules will have enough thermal energy that their speed will exceed the escape speed of the planet. The atmosphere will then "leak away" and be lost. This happens when:
It turns out (HW#2) that the Earth is unable to hold on to a hydrogen atmosphere -- it's a small planet which is too close to the sun. No helium, either. The Earth quickly lost its primordial atmosphere.
So where did the current atmosphere come from?
The Earth couldn't hang on to its
primordial atmosphere. Something else must have contributed to a secondary
atmosphere. What spews out lots of gas?
We expect this secondary atmosphere
to be largely composed of water vapor (H20) and carbon dioxide
(CO2), with a little bit of sulfur (S2) and nitrogen
(N2) thrown in.
So why don't we have a CO2 atmosphere (like Venus, or even Mars)?
On Earth, the surface temperature
is cool enough for H20 to condense into water. CO2
dissolves easily into water, and from there into surface rocks such as limestone.
Nearly all the Earth's CO2 is in such carbonate rocks.
(The Goldilocks Effect)
What's left? Mostly N2.
But what about the oxygen? Where did that come from?