The moon has many other advantages. The lack of atmosphere probably means quite a bit less maintenance on surface structures. Put a big dish on the moon and aim it at earth, and it’s going to stay pretty much intact for as long as you want. On Mars it’s going to get sandblasted, covered in dust, possibly damaged by high winds, etc.
The lack of atmosphere means you can build things like telescopes and radio antennas out of much lighter materials, too. That, coupled with the lower gravity makes construction easier.
The closeness of the moon makes communications MUCH easier, and allows direct control of automated manufacturing facilities, robot rovers, etc. from Earth.
If there are significant amounts of ice, then we can easily make plenty of oxygen, rocket fuel, and we have water. That makes resupplying the station much less daunting.
The moon may have lava tubes that can be turned into habitats. That’s the really interesting thing to me - the ability to tunnel under the moon and open up some really large spaces. With lots of space and a large supply of water, you can do anything. Hydroponic farming, heavy-duty manufacturing, etc. Some of these tubes may be hundreds of miles long, and should provide plenty of protection from radiation.
Getting energy on the moon should be much easier than Mars. It’s closer to the sun, so solar power works better. And again, a lack of atmosphere means you can build some truly impressive solar arrays with lightweight structures, and they’ll last far longer than they would on Mars.
Finally, the moon could become a source of raw materials for space manufacturing. Put a mass driver on the moon, and you can build large spacecraft in orbit. Or if that’s too technically daunting, you can at least fire mass into space for use as radiation shielding. And you can fuel ships from the moon.
Most of this stuff is not on the horizon - we won’t be doing large-scale construction on the moon for decades, if ever. But at least there is potential there. It’s not just a useless rock.