If someone in place A with cheap, stranded power enters the mining business, the difficulty of bitcoin mining will increase, and perhaps enough to convince a miner in place B to exit, and thus free up some energy there to use in another productive endeavour. Be that for computation or for a different use.
In this sense bitcoin mining acts a bit like a pneumatic system to 'move power around' in a virtual sense.
I specifically use pneumatic as the analogy, and not hydraulic, because hydraulic fluids are incompressible.