Most large companies impose certain costs on society, and have to manage their reputation. Often it's cheaper to improve public opinion in a peripheral area than to address deep-seated problems.
Putting a data centre close to a hydroelectric dam helps offset your product's impact on users' mental health, your disregard for competition law, etc.
[1] https://datacenters.google/operating-sustainably/ [2] https://sustainability.atmeta.com/data-centers/
Those lists are the companies marking their own homework and congratulating themselves as PR, AKA "greenwashing". They can do that just fine by spinning a single metric of their choice where they do less-badly than their pick of mean, median, and mode of whoever else they want to compare themselves against, they don't actually need to be genuinely eco-friendly at anything.
You also want cheap, reliable power. Ideally eco-friendly. And you want backbone connectivity, of course. Local suppliers who know the construction and maintenance needs of a data centre. No earthquakes, hurricanes, wildfires, flooding, or tornadoes. A local government that won't tax you too much, and that won't get upset when you employ very few people.