The temperature differential between day and night on the moon is far more extreme than it is on mars. That .01 atmosphere is considerably more than the hard vacuum of the moon. There’s also the 2 weeks of day and night of the moon vs 26 hour martian day.
The nearness of the moon makes it a smarter test bed. We’ll need to be living on the moon to in the future if we intend to be a spacefaring race anyway.
Plus, I’m assuming you suggested it for a reason.
I guess "closer" covers it, but it doesn't really. It took the mighty Saturn rocket ( which we no longer have !!! ) to send three men to the moon, so what about Mars? ... never minding the years long versus days long journey? The energy requirements are made all the more greater by the greater mass of Mars.
It just seems to me that if we were in a position even to realistically contemplate a manned journey to Mars, building a moon base would seem so easy that we might as well do it first, as a staging point if nothing else.