Agreed, but i would think it’s mostly an upfront cost. Datacenters have massive footprints, the roofs could be covered with heat exchangers, also covered with solar panels. It just takes some regulation to encourage it.
If you want to get really into it, you could figure out a way to reclaim all that heat energy.