Seems to me that it would depend on the details. If the store just happens to be cooled because the pipes run closely by the store, then I'd say it's on the brewery to insulate the pipes. If the store rigged up something specifically to dump their heat into the pipes, then surely the legality would depend on how the property rights work for pipes running through the ground.
If I hook my house up to your house's electricity supply, it's the same thing. Even though you don't have less electricity than you had before, I have caused more to be used that you are paying for and I am taking and benefiting from.
I am in effect causing the electric company to sell you more power, which I am then taking for myself.