It was a reward for the biggest campaign donation in US political history. Musk didn't rig the election, he's not that competent or powerful. Occam's Razor tells us what happened was the Democrats went with a strategy that has never worked before (changing candidate mid-race), and they ended up predictably losing. That's it.