It’s their money to invest only if it comes with no strings attached, no obligations to use it for a specific purpose. We don’t know if this is the case, so there’s no basis to argue that they can do whatever they want with it.
What is corruption? It’s a form of dishonesty that is undertaken by a person or an organization that is entrusted in a position of authority. That certainly seems to be the case here - not by SpaceX, but by Musk and his involvement in the government.
And Musk has everything to do with Grok.