SpaceX's success is easy to explain: they could do the same task as competitors for a substantially lower price.
As for Tesla's market success, I think that's predominantly driven by the product itself. They won countless car of the year awards. Customer satisfaction levels at near-unprecedented levels. Record-breaking 0-60 times provide an angle for gushing media coverage. And a decade of having no competitors in the market subset of desirable EVs. I've personally never heard anyone mention Elon when describing why they're interested in—or purchased—a Tesla vehcile.
They also intuited/gambled/stumbled upon (pick your verb depending on what you think of it) that “electric and fast” was enough to compete against non-EV cars with much better finish.
I mean, yeah, sure on the surface it's economically rational and all, but really--you're already nominally in charge of at least 3 different large companies, yet this is how you choose to spend your time and energy? Nickel-and-diming Twitter for lulz?
edit: and before someone points out what a big difference a few dollars in the share price would make towards the acquisition price: if he really believes that Twitter has so much untapped potential (economic or otherwise), then a few dollars either way shouldn't matter much. But by going to such lengths to slightly reduce the cost and jeopardize the deal, he shows that he doesn't think it has much potential and/or he's just screwing around.