Related links:
The Origin of an Atmosphere
There are four ideas for the origin of a planetary atmosphere. Those four ideas are 1. that the planet-elements of which a planet was made released the atmosphere, 2. that the atmosphere was drawn to the planet from the gaseous cloud out of which everything came, 3. that comets hit the planet and brought molecules of air with them, 4. that volcanos erupted and made an atmosphere from gases inside the planet.The one that applies to Jupiter is hypothesis #2, in which the original material, which Jupiter drew out of the primitive nebula stayed, and forms the atmosphere today.