Our condo was built 30 years ago by expert corner cutters. I keep discovering new ways they cut corners, or I get curious and investigate one I’ve noticed before but never looked into.
Today I pulled the electrical tape off this thing in the utility closet which appears to be connected to the HVAC system (electric heat pump), and which probably once upon a time had a cover that someone lost and couldn’t bother to replace with anything other than a few strips of tape.
Our doorbell doesn’t work anyway. The bell button is next to the front door to the lobby, but we have our own entrance in an alley, and the connections have been severed at some point during previous owners renovations.
As others have mentioned it’s a transformer meant to run a doorbell, but I thought I’d add that furnaces generally supply low voltage to run the thermostat from their internal circuitry without an external box like this.
There’s no cover because 10 volts is not a shock hazard, these are generally placed in basements or utility areas where there’s no need to make it look nice, and it’s unlikely to get shorted out mounted on the wall like that.
If you ever have an electrician or a friend that’s comfortable working with mains voltage around, I’d have him or her remove it and put a blank cover on the box because if it’s still connected to the mains, it’s drawing a small amount of electricity without doing anything.