Here's why:
* Lack of Atmosphere: Both Mercury and the Moon have very thin atmospheres, meaning they lack the protection from asteroid and meteorite impacts that a thicker atmosphere provides.
* Geological Activity: Both celestial bodies are geologically inactive. This means they don't have volcanic activity or plate tectonics to erase or reshape the impact craters.
* Age: Both Mercury and the Moon are very old, which means they have had a long time to accumulate craters from impacts.
While other planets and moons in our solar system have craters, Mercury's surface is particularly heavily cratered due to these factors.