The current administration is “rejecting the idea of electric cars out of stubbornness or politics.” See: Trump moving to withhold funding for EV chargers, terminating EV mandates and government support, etc. I don’t know what Musk is thinking by supporting this administration so steadfastly as they work hard to undermine his own efforts and initiatives.
I'm not making any specific assertions about what's in Musk's heart. I can draw some conclusions from his behaviors, actions, and words, but that's neither here nor there.
Musk got what he needed at the expense of losing some tax incentives for his customer base. He was able to shut down government investigations into him/his companies. That alone should have been worth quite a salary bump.