Higher density allows the surface to be closer to the center of mass, so the gravity there will be higher. Stand on a hovering platform 6300km from the Moons center and the gravity will be just 1% of Earths, since distance beeing equal, the only deciding factor will be the mass.
That's why the gravity on the surface of neutron stars is so high, even when the mass is the same as our Sun.
The earth doesn't have uniform density at all depths - not sure about the moon. I forget exactly, but I was just reading about how if you could travel to the earth's core, because the density increases a lot, you would continue to experience around 1G something like halfway to the center.
That's why the gravity on the surface of neutron stars is so high, even when the mass is the same as our Sun.