Well his first startup capital would be from his parents that own diamond (blood, not synthetic) mines in South Africa. That's how he and his brother started Zip2. That got bought out and left Musk with an extra $22 million. He then started x.com which, by all accounts of people who worked there, was a total failure. In all ways but one: they were the first federally insured online bank. That's why Confinity (which owned PayPal) bought x.com (and then killed it. Because they only wanted the legal benefits not the product itself). That's when Musk truly became rich
But you're right that government contracts are the way you truly get rich. A lot of people don't realize California's biggest export is airplanes and airplane parts (a business run on gov't contracts) not Silicon Valley. All of Musk's ventures (Tesla, SpaceX, Boring, solar, etc) rely on heavy subsidization/contracts with gov'ts. All of his ventures are some of the most heavily subsidized companies in the US[0] and he's been sued in several countries over subsidy fraud
Yeah, he made his first big money from PayPal (I think around $300M), and then invested most of that money in SpaceX and Tesla, and that's how he became a billionaire.
180m after taxes -> 100m to spacex / 70m to tesla / 10m to solarcity.
remember before the gvt pumped money into his companies they were on the brink of bankruptcy. once they got the nasa contract spacex immediately got profitable. which allowed musk to use spacex money to loan to tesla. n also use the govt loan to tesla to make the save the company.
gist of the story - the money is in gvt. same applies to thiel.
that's when I learned I'm playing the wrong game by trying to provide private services instead of targeting gvt.