Taxpayers subsidize data centers in many other ways. These are prestige projects for politicians, so they often get long-term tax breaks and other preferential treatment.

I think it's part vanity, part a misunderstanding about the economic benefits of a datacenter (which are nearly nil, as they employ very few people and produce nothing for the local market), and part just a desire to score brownie points with wealthy corporations, which might mean donations, campaign support, or other perks for the politician who makes it happen.