It is likely a transformer with remove any spikes on the supply, where if supplied direct to a semi-conductor device the semi-conductor can be damaged, however electrolytic capacitors also have a limited life, so with a switch mode power supply had to say which caused it to fail. Also most modern devices stipulate use of RCD protection, since we have no idea what is inside them, hard to say if really required or manufacturer playing safe.
But this means today we expect to see in the consumer unit both surge protection devices (SPD) and a residual current device (RCD) often the RCD is combined with the MCB (miniature circuit breaker) with a RCBO.
There is some debate on how important these devices are, and the electrical safety council in their best practice guide show
View attachment 252809 with the comment they can still provide satisfactory service.
Never the less you need to consider if it needs changing.
I do see his point, with a fuse the impedance required out cause it to open circuit in the event of a fault within the required time if exceeded a small amount will just take a little longer, so maybe 0.15 seconds instead of 0.1 seconds, but the MCB is two trips in one, the thermal device will likely take 5 seconds to trip, but the magnetic part can trip in 0.01 seconds, so the loop impedance with a MCB is really important.
So yes in theory the loop impedance should be checked before changing a MCB from 5 to 6 amp or type 1 to type B, however in the real world there is no way to test a MCB or for that matter a fuse, with out the risk of damage, and you already had a MCB fitted so swapping it is unlikely to cause a problem.
However unlikely you can by a replacement mirror which does not require RCD protection.
Also this
View attachment 252812 is not permitted, and if done where it is clear it is non compliant the question is where else has it been done.