Market cap doesn't say how much cash they have available. For that, look at cash on hand which publicaly traded companies need to report
MS has about 75B cash on hand, so they could afford this themselves. They will probably argue that it will bring jobs and expertise to the state. Also, it's a loan, so the interest will generate funding for the state as well. nevermind, not a loan from the state, so no interest would go to the state.
If people quit larping propaganda and followed the dollar from it being earned into their pocket to going back into the employer's pocket... it would a different society.