On the surface, the two couldn't be more different. Musk made a name for himself by making bold bets on futuristic technology: digital payments, electric cars, solar panels and privatized space exploration. His businesses typically require years of upfront investment before showing a profit.
He's cerebral but a little reckless, like a precociously smart teenager — he proudly told the story of how he crashed a $3.5 million McLaren sports car while driving too fast in a bid to impress Peter Thiel. And he didn't think to buy insurance first.
Trump, on the other hand, built his fortune in a business firmly rooted in the here and now, real estate, and his temperament is more like the scolding school principal's.
They're also diametrically opposed when it comes to climate change. Musk's business interests revolve around reducing dependence on fossil fuels, while Trump has pledged to cut through regulations meant to fight climate change, and once called it a hoax (although his pick for EPA administrator, Scott Pruitt, has admitted it's real).
So what to make of the fact that Musk was at the White House on Monday, appearing alongside execs from Ford and other old-line companies like Lockheed Martin and Johnson & Johnson? In addition, Musk was part of the December meeting between tech leaders and Trump, even though his companies have a much smaller market value than most of the others represented around the table, and he was reportedly invited to stay for a second smaller meeting alongside Apple CEO Tim Cook.
The Thiel connection. Musk has deeper connections to Trump tech advisor Peter Thiel than nearly anybody else in Silicon Valley. The two met when they led PayPal together (at the time Thiel's start-up bought Musk's), and Thiel's VC firm, Founders Fund, was an early investor in Musk's space exploration start-up, SpaceX.
Musk's businesses are also the type that Thiel admires and thinks we need more of — companies making big bets that could have a dramatic impact on human progress, rather than focusing on incremental improvements or making things cheaper.
American jobs. Tesla, like most American manufacturers, sources most of its parts from countries where labor is cheaper. But the company is building a huge factory in Nevada, the GigaFactory, to provide batteries for its cars. It already employs more than 800 workers, with at least 1,000 more to come, plus additional workers onsite for battery partner Panasonic. These are precisely the kinds of American manufacturing jobs that Trump laments having lost to overseas competitors. Moreover, once the factory is complete, Tesla may replace Ford as the car with the most American-made parts.
Private sector competition. SpaceX is a perfect example of a private company taking on a huge task — space travel and exploration — that used to fall exclusively to a federal government agency. This is exactly the kind of private sector invention that libertarian-minded conservatives, like Thiel, encourage.
If it continues, this unlikely alliance could have benefits for both sides. Musk gets an ear to the president who's promised to shake up the current order and make it easier for American companies to do business. Trump gets the support of a visionary technologist who could help repair his image among the Silicon Valley tech community, which was vocally opposed to Trump during his candidacy.
While this may seem surprising to a lot people, it's not totally surprising to investors. Tesla is up about 31 percent since the election, while the Dow Jones industrial average is up roughly 9 percent since the election.
Correction: Scott Pruitt is Trump's pick for EPA administrator. An earlier version mischaracterized his status.