More critically: just because a company is worth $1 trillion doesn't mean it has anywhere close to $1 billion in cash at all, let alone able to be earmarked to a given project (at the presumed exclusion of other projects).
Granted, a project like this probably doesn't strictly need all $1 billion all at once, but I'd argue it's better to get whatever necessary funding upfront instead of risking having sunk a partial investment without being able to obtain the rest should the company's financial situation change.
Microsoft had over 94 billion in cash and cash equivalent as of June 2025.
My assumption is that the real reason this is a loan from the government and not paid directly by Microsoft has to do with other factors, like Microsoft not waiting to be in the hook for the billion dollars if the partner company folds, or the potential for loan forgiveness, or other incentives that make the effectively loan cheaper than cash.