The box thing is a mop sink.
My guess is that the sink was there first. It has a drain in the bottom, and if it had been added after the transformer,there would be some evidence of the drain being cut in. The floor doesn't show that to me. The xfrmr looks much newer.

Kevin, is that a panel in the right corner?
Would an electrician stand in the sink to work on it?
The upside? They left you a $10 J Box, still in its wrapping.

No inspector in his right mind would ever approve this.