Obama was center-left. That's about as left as he got. Cautious left. Safe left. He was the same guy who wouldn't prosecute bank executives and bailed out financial institutions because he wanted economic recovery more than justice. I don't call that a leftist. Still thought he was fairly effective given all the partisan bullshit he faced, but he was mainstream.
If Elon did actually vote for Obama - and that's an if - it's only because as a tech entrepreneur starting his own EV company he probably felt that his political interests were more aligned with Obama policies (like cutting CO2) than with McCain and Romney. That's what good businesspeople do. They don't get caught up in culture wars like you guys. They look at their bottom line.
Musk and other like-minded tech bros (Thiel, Dorsey, et al) have bigger ambitions, and they probably regard the party that advocates expanding the vote, higher taxation, more regulation, more welfare spending, DEI, and so forth as being out of alignment with that agenda.