Mars is an easier place to build a base than the Moon. You send the people to Mars, they build the infrastructure and refuel the ship, then they send the ship back. Meanwhile, they start producing drinkable water, breathable air, and food, all things that can theoretically be done there. When the next people show up, the ground has been broken, and the second wave can get started helping out, while the first wave start pumping the fuel (from the system they built the first time round) into the ship to get it heading back as soon as the second wavers are unloaded. People can be, and will be, kept busy building, colonising and terraforming.
The Moon, on the other hand, is a rock. You can't produce air, you have to bring your own water etc. Production of the basic essentials for human survival is impractical, if not outright impossible; the best you can hope for is efficient recycling, which isn't helpful for a growing colony. Once you've built the shelter (entirely from things you brought with you) and plugged in your recycling systems (which you brought with you), you're done; wait for the next shipment of supplies to arrive. When the next wave arrive, they're going to be setting up their new base, but it's not like you're going to have made any supplies to help them out.
So the Moon is closer, sure, but without a way to easily produce the things you need (not forgetting refueling the ship to return it), the only advantages it has over Mars are a shorter travel time to Earth, and less gravity to fight as you leave. Basically, it seems a heck of a lot easier to build a base on Mars than the Moon... even if the commute is a pain.