That was their excuse. But they probably knew it already upfront, and of course Trump himself has done so and obviously knows that rich people donate to both parties just to cover their bases and that it means relatively little.
I think it's more likely that Jared was pulled at the suggestion of some staffers that never liked him or Musk in the first place but weren't able to get their way with Trump as long as Musk was still around.
Basically they pulled a fast one on Musk, who believed that with his giant (300$ million give or take) donation would be able to get his preferred candidate to NASA.
The fact that he was quite competent and generally liked doesn’t matter to Trump, who seems set on defunding NASA and having someone there who won’t complain.