Common mode noise mitigation in two pin smps
There are two things to consider. A power supply that is unearthed won’t usually pass output noise regulations without a filter tying the output (via a noise reduction capacitor) to something like ground. Given that the noise on the output is mainly produced by internal switching noise, the choice made by designers is to use an appropriately rated capacitor from one of the output terminals to live, neutral or the DC bus voltage. Not perfect, but for small devices, good enough.

The second thing to consider is that this can produce an open circuit voltage of about 50% of the incoming AC supply voltage on both output terminals and, it’s quite possible to feel a small tingle or see a small arc if handled in such a way so as to promote said tingle or arc.

It’s not dangerous but, it has been known to damage sensitive electronics. This second outcome is because the added capacitor used as a noise reducer on the output inevitably couples low frequency AC from the mains power input to the DC output.

Not perfect I know.