The much higher amount of oxygen gas around Earth is because of the oxygen cycle. Photosynthesis takes hydrogen from water using energy from sunlight, which gives off oxygen gas. The hydrogen combines with carbon dioxide to make carbohydrates. Respiration then takes oxygen gas out of the atmosphere and turns it into carbon dioxide and water. This happens at the nearly same rate, so the amount of oxygen gas and carbon dioxide doesn't change much because of it.