Yup, sending the Starship to the Moon first is really just part of system development and testing, practice for the envisioned routine working system. It'll still be an awesome system for lunar missions.
The first settlement on Mars will likely be built by a version Optimus before many humans arrive. The moon can be a place to hash all that out prior.