Violation of the Universal Plumbing Code. The Temperature Pressure Valve is dual function. It is supposed to dump if the water gets too hot or the pressure gets to high. And, it has to have a drain line which vents to a sace discarge point, to avoid harm to humans, pets, etc.. Plus the drain has to be somewhere it can be seen, so you know it is dripping, and drain where it won’t cause damage to the structure. You can drain to the floor of an unfinished basement, but if you put it in a finished mechanical room, it has to go to a floor sink but leave an air gap.
A common OSHA violation in light commercial buildings, converted fro housing, because folks constantly want to store a bunch of whatever, or cleaning supplies in the mechanical room.
i think you can still find the Myyth Busters episode of the exploding water heaters on YouTube.