He isn't. I know a dozen smarter people than him who didn't have everything break their way like he did.
People act like Elon is Bill Gates or Steve Wozniak, or any other visionary who did the work themselves.
Musk was a beneficiary of the 90s dot com bubble and made some good capitalist moves, but didn't develop anything exceptional.
His first business he started with his brother was zip2, which was an early mediocre internet company. He did well setting it up and finding a niche and doing it. But if Compaq didn't buy it in an attempt to boost Altavista it probably peters out as Google destroys the internet environment killing off the what I call internet 1.0 companies.
He then made x.com which he was ousted as CEO infavor of Intuit's CEO. Paypal was not his and came via merger and he was ousted as CEO of that company.
Again Musk isn't an idiot, he's not a moron, but if he wasn't born with a silver spoon in his mouth, he isn't rich. I know plenty of people who're smarter than him. But they didn't have the luxury of the safery net he did.