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/