
Actually, that’s an OK installation. Just because it looks bad doesn’t mean it is.
Here’s what I bet they did:
When they did an upgrade and wanted to install that pull station, it would be VERY expensive and time consuming to flush mount that station in masonry. Ever tried to cut a single-gang hole in brick? Not fun. Not fun at all. (unless, of course, you’re a mason.)
If you are going to surface mount a device, you need conduit leading to a nearby dedicated power-limited fire alarm junction box.
Only power limited fire alarm cable can be run through these pipes and boxes. (and burglar alarm cable if allowed by the AHJ.)
What’s the perfect place to get to one of those boxes? Why, the horn above. There just needs to be access to the junction box, and that can easily be done by protruding it from the wall, or surface mounting it. It may not look too pretty, but it sure works and makes the AHJ happy.
The reason they put two junction boxes on top of each other is simple- they are not truly “junction boxes”, but rather extension rings. They are meant to extend the depth of a junction box for deep devices, like that 4051. The 4051 is deep. So, they needed two boxes to accommodate that oversized electromagnet on the back, and also to make it easier to run the pipe up.

