According to CNBC, SpaceX is funding Starlink in Ukraine, not the government:
“Musk reportedly told the Pentagon in October he would no longer finance the Starlink terminals in Ukraine as the country prepared to fight through the harsh winter months. However, the billionaire reversed course and did continue to fund the service.”
The Pentagon said Thursday it has agreed to purchase Starlink satellite internet terminals from Elon Musk’s SpaceX for use in Ukraine as Kyiv continues to defend itself against a full-scale Russian invasion.
According to CNBC, SpaceX is funding Starlink in Ukraine, not the government:
https://www.cnbc.com/2023/06/01/pentagon-awards-spacex-with-ukraine-contract-for-starlink-satellite-internet.html#:~:text=Musk reportedly told the Pentagon,continue to fund the service.
First paragraph of the article you linked:
deleted by creator
That’s true, but still, those terminals cost money and SpaceX has provided free access for thousands of Starlink stations for Ukraine military access.