Atmosphere above earth surface consists of air. Since there is no air present above moon surface.
Another explanation related to escape velocity.
Escape velocity is given by . Here M and R are mass and radius of earth/moon respectively.
For earth escape velocity is 11.2 km/s.
But for moon escape velocity is 2.38 km/s.
Hence due to thermal energy all gases will escape from moon surface due to low escape velocity