This is a capacitive dropper power supply. The bulk of the voltage is dropped across the 'safety' rated capacitor C1. It acts a bit like a resistor but does not dissipate significant heat. The reactance is Xc = \$\frac{1}{2\pi f C} \Omega\$\$\dfrac{1}{2\pi f C} \Omega\$.
R22 prevents an excessive surge if the plug gets put in at the peak voltage of the mains. R1 discharges C1 so you won't get a shock from the AC plug prongs.
The bridge rectifier and Z2 give you a lower voltage DC smoothed by C2, further smoothed by C5. I don't think the part number is correct on Z2 and D5 should probably be another zener.