From Michael Illuzzi
Earth's atmosphere consists of the volatile gasses that boiled out of the infant Earth, were dense enough to be retained by gravity, and were sheltered from being blown away by our magnetic field.
Thumbnail image from NASA.