The timescale for O2 to be stripped from the atmosphere (by reaction with reduced chemicals exposed by erosion, weathering, and emitted from volcanoes) is only about 10 million years, so the current composition of the atmosphere is due to recent conditions, not ancient conditions.
There is an open question of why atmospheric O2 has been relatively stable (varied by a factor of several) in the Phanerozoic. This may just be anthropic selection: if it ever fell too far, higher life would have been wiped out, and we wouldn't be here. This has implications for the existence of extraterrestrial intelligence: it might be that most life-bearing worlds suffocate themselves before ETs can evolve.