Musk wants humans to become an interplanetary species, full stop. Everything SpaceX does is in support of that.
Vast amounts of money and resources will be required for the final goal, likely more than SpaceX will ever have or control. So, in order to get others to spend big on the main goal, SpaceX needs to demonstrate realistic capabilities, such as bootstrapping a permanent settlement on Mars, though dependent on regular shipments from earth.
To accomplish that, SpaceX needs a lot of cash.
Crew Dragon is about the cash. Starlink is (mostly) about the cash.
I'm less certain about the following, but it might be accurate: Tesla is about the cash necessary to bootstrap a Mars settlement. If Tesla really goes big, Musk's shares will be worth many more billions than they are worth right now. I would not be surprised if, at some time in the future, he cashes out of Tesla and drops it all on SpaceX.