Well obviously, if there wasn't any oxygen in the earth's atmosphere,
then there wouldn't be any ozone, either and this warming
in the upper part of the stratosphere and lower mesosphere would not be occurring.
And indeed, if we look at other planets that don't have a lot of molecular oxygen
in them, such as Mars and
Venus, then we see temperature profiles that look more like this.
They are warming near the surface.
Because of whatever greenhouse effect they have.
Venus has a very strong one.
Mars has a very weak one.
But they both have warming near the ground.