Tearing out the entrance floor of a house built in '73.
In the built-in closet in the hall, there's this. What is it??? Does it have to stay?
Behind the closet, there's just a wall and then an area for hanging clothes, nothing is visible on the backside so the wires must go into the wall..
It's about the doorbell being placed in two different locations; one is above the entrance door (visible), and the other is hidden at least 3 meters away from it.
If the image had been clearer on the embossed text, it would be easier.
But it mostly resembles a transformer for something. Or possibly a doorbell/siren, maybe in that case for a burglar alarm.
I lean more towards transformer, since it looks like there are several approval symbols on the plastic. That is, something with 230V. Sirens usually don't have that many type approvals.
Do you have batteries in the doorbell - if not, I would guess that this is your transformer for the same. As mentioned, I can't see what symbols are on it, but I guess that's the case. Have you checked if you have the same white cables behind the door button or the bell on the wall?
I am almost certain that it is the transformer for the doorbell. The box in the hallway is the one that makes noise when someone rings the doorbell, and this box ensures that the current is only a few volts.
Cut the wires and see if the doorbell stops working.
You don't need to cut the wires, just unscrew the two screws at the bottom, remove the small plastic cover and loosen some of the wires, and then you'll know