By that logic it would have made more sense to try to get supersonic flight working before lighter-than air craft.
Nice reductio ad absurdem. Seriously, analogies like this almost never are relevant. And this is slashdot so please use a car analogy if you must. :-) Anyway some things about a Moon base will be harder but others will be easier, not the least of which are the logistics involved.
Much more extreme temperature swings
Which if you can handle those, the ones on Mars should be a piece of cake. Don't forget about the effects of the moon passing through the Earth's magneto-tail either. Huge charge buildups will be challenging to say the least.
- Razor-sharp abrasive dust that will quickly destroy seals, gaskets, and other soft materials (no weather to wear it smooth like on Earth and Mars)
Last I checked there is an awful lot of abrasive dust on Mars too AND the dust on Mars has an atmosphere to blow it into all kinds of inconvenient places whereas the Moon does not. Is it the same? Of course not. The moon dust has different properties. But there will likely be overlap in lessons learned.
2-week nights that make solar power nonviable without massive battery banks
Versus the occasional planet wide dust storm. If we're going to Mars with people we're probably going to have some form of nuclear power along for the ride. Solar will be important but we'll need to learn to work around the occasional bit of darkness on Mars or the Moon
much lower gravity, making adapting Earth-based nuclear reactor designs more challenging
Since we're not going to be on Earth why would we use a reactor designed for operation on Earth? We actually understand the physics of this problem rather well.
very few resources relevant to sustaining life (contrast to plenty of water and CO2 on Mars)
There is apparently water on the Moon. Furthermore it's close enough that we can deliver supplies to the moon while we figure out what works and what doesn't. With a Mars mission you pretty much have zero margin for error thanks to the distance. We already have the technology to get to and from the Moon (comparatively) safely. The same cannot be said for Mars and no matter what Elon Musk claims we're not going to go there for some time yet. Why not go where we can and learn what there is to learn?
Furthermore you are forgetting about many of the advantages of a lunar base:
1) Smaller gravity well than Earth so it can act as a forward base of operations. Comparatively cheap to get to.
2) Excellent location for astronomy given the lack of atmosphere
3) Effects of lower gravity (versus micro-gravity) on human physiology can be studied.
4) Evacuation is actually possible should the need arise.
5) Round trip communication delay is ~3 seconds versus 8-30 minutes for Mars.