In a way, the left helped create Elon Musk.
The right wingers treated him slightly better.
People want to be liked. Perhaps especially slightly autistic people with marriage problems. The nerd entrepreneurs of Silicon Valley aren't exactly popular. But they probably wish they were.
So he did more stuff to get liked. You excite a lot more people with antics like his than with something like the Gates foundation, which nobody cares about even though it's doing important work.
In the process, he got even more negative feedback from the left and even more positive feedback from the right. You can see how this works.