system
Given the following post, respond as if you're commenting on Reddit:
human
Where did the Earth's atmosphere come from? Did it just somehow already have one when it formed, or pass through a gas cloud in space, or create its own gas somehow?
gpt
Earth has had several atmospheres, all wildly different from each other.

The first one consisted of the lightest elements from the accretion disc that formed Earth in the first place.  So it consisted mainly of hydrogen and helium.  But they are so lightweight that they escaped high into the atmosphere, to be carried off by the solar wind.

The second one was a product of Earth itself, from volcanic outgassing and the like.  Mostly nitrogen and CO2, plus whatever happened to be dumped here by cometary impacts.

The third and current one was created by life, which consumed the atmospheric CO2 and liberated the oxygen contained therein.  The carbon got sequestered as coal and whatnot.