Sure, but that's to my second point of if they pick up camp and leave, that's still developed property that has potential to be more useful than it had been.
And in the same way that construction-damaged roads can lead to costs on everyone else - the development of that land employed people, and that is a positive thing for construction workers and their families (more than just financially).
Just because you can point at negative consequences doesn't mean positive ones don't exist as well. It's rarely black and white as to the net effects of things like this. You could/should even be considering what doing a build-out like this does for the reputation of a city, and the sense of optimism it can bring to a local community that might otherwise be left behind, completely out of the picture. There's another world where a small town appears not in an article about a new datacenter (or the possible ensuing city renege boondoggle) but as a small blip in a story about how small towns in this country have decayed as a result of being passed by during the current tech "boom".
It's also not all that trivial (or cheap) to just transport a datacenter to another state, or even county. You'd have to be pretty sure that whatever tax you're trying to now avoid is more than the (potentially) zero-tax new build or relocation you'd have to do to "escape".
At the end of the day, it's the responsibility of the local government to make sure that the deal is a net benefit to the community. Maybe that is too much to expect lol