Why doesn't oxygen replace chlorine?
You can displace chlorine from hydrogen chloride.

With sodium chloride, if you did form sodium oxide it would be a strong base.  As such it extracts a $\ce{Cl^+}$ moiety from any potential chlorine molecules.  Sodium chloride is oxidized by oxygen, but the oxidized chlorine ends up as hypochlorite oxyanions such hypochlorite (i.e., oxide coordinated to chlorine).