Musk is brilliant, but he doesn’t seem to have any appreciation for history. Sovereignty emerges from the barrel of a gun. Once sovereign entities are established, those entities can get together and make agreements with each other, agreements which have the force of people with guns behind them. Individuals get born into these sovereign entities, and are bound by the laws of those sovereign entities.
The law of sovereign entities has to be respected to the extent that the entity has the hard and soft power to enforce them. Kim Dotcom has never stepped foot on US soil, yet New Zealand’s Supreme Court just ruled that he can be extradited to face trial under US law.
Musk has no idea what he’s talking about here. Unless he plans on building a fully self-sufficient colony on Mars, which would be a heck of a trick, that colony is going to be heavily dependent on Earth for supplies. Whatever country or company to do that supply is going to be doing it under the laws of the host country. Mars’ remoteness does have some effect on the ability for other countries to impose rule. If someone commits a crime under US law on Mars, it’s not like the US is going to send cops to Mars to arrest them. But they can deny any and all resupply except that which is strictly necessary for survival. That’s the difference between hard and soft power.
And we already have precedents, Antarctica and the International Space Station. As questions arise, government officials will get together and make decisions. Sovereignty isn’t created just because people are now in places where before there were no people. That’s never been how it works. People fight for that sovereignty with their lives. That’s how it works.