Here's why:
* Gravity is a force of attraction between any two objects with mass. The Moon has mass, so it exerts a gravitational pull.
* The strength of gravity depends on the mass of the objects and the distance between them. The Moon has significantly less mass than Earth, so its gravitational pull is weaker.
* What we see as "weightlessness" on the Moon is actually the result of being in freefall. Astronauts on the Moon are constantly falling towards its surface, but they also have a horizontal velocity that keeps them from hitting the ground.
So, instead of saying "zero gravity" on the Moon, it's more accurate to say that the Moon has a weaker gravitational pull than Earth. This is why objects appear to float on the Moon's surface, but they are actually still being pulled down by the Moon's gravity.