In the world that we have today, Earth is inhabited by life while Mars is not.
In Earth's atmosphere, there is a powerful magnetic field that deflects the particles from the Sun. With the lifeforms that inhabit the Earth, they help keep the Earth's atmosphere and climates running.
Like some other planets, Earth experiences Sputtering. It is when the Sun sends down molecules that are sent back. The Earth does a good job at deflecting it.
Mars is also one of the Planets that undergo Sputtering. Mars has undergone the pressure of it for likely many years.
Mars also has signs of lifeforms. There are rocks and pebbles that were signs of flowing water on it's surface. It also has craters that showed there were lakes.
However, Nowadays we don't even need Oxygen or any other source of air.They all are gone.