I have a condo in a large building with many identical units. Several times other owners have mentioned that the original layout of the utility room isn't up to code due to the proximity of the water heater to the electrical panel--it comes up during sales inspections and some owners have spent quite a lot of money to relocate the panel.
In my research I haven't been able to find any such code; the nearest I can find is 110.26(A)(2) which dictates the free space around the panel.
NEC 110.26(A)(2) Width of Working Space.
The width of the working space in front of the electric equipment shall be the width of the equipment or 750 mm (30 in.), whichever is greater. In all cases, the work space shall permit at least a 90 degree opening of equipment doors or hinged panels.
By that standard the design is up to code, the water heater is just far enough to the side to provide the needed working space.
Is there another code that is specific to the proximity of the water heater?