Question: what are the functions of the atmosphere?
Answer: It has the oxygen that we need to breathe.
The atmosphere filters the Sun's rays. If there were no atmosphere, the Sun would burn us more.