How does this transformerless 5V power supply work?
It's you.

The 1.5uF film capacitor acts as a reactive (lossless) dropping element. D21 shunts negative current away and D22 conducts positive current to the filter capacitor C23 and it is limited by the 5.1V Zener diode D23. The 1M bleeder resistor (across the 1.5uF) prevents a shock from touching the plug pins after it's pulled. R21 limits the peak current to about 7A if plugged in at an AC peak.
This kind of circuit requires all elements that could come in contact with a human to be isolated from the mains for safety, including any kind of display, switches etc. Any breach in that insulation (including you opening up) could lead to a potentially fatal shock.


As in the comments, your heater should go directly to the N side of the mains. There's probably an overtemperature fuse cutout in there somewhere too, maybe buried near the heater, and probably an overcurrent fuse somewhere.