Why does all the oxygen of atmosphere not get used up?
The balance of oxygen and carbon dioxide in the atmosphere is maintained by plants and animals.
The oxygen released by the plants during photosynthesis is taken in by animals and the carbon dioxide released by animals during respiration is taken in by plants during photosynthesis. Hence, there is a balance of oxygen and carbon dioxide in the atmosphere which is maintained by both plants and animals.
Plants also consume oxygen during respiration but the amount of oxygen produced during photosynthesis is more than what they consume during respiration.