...Otherwise known as a reactive dropper.
Cheap, but dangerous. If the coupling cap goes short your equipment catches fire!
I was once involved in investigating an insurance claim due to a house fire caused by a PIR security lamp with such a circuit. The company that produced the lamp were sued for a lot of money!
Ways to make is safer are to use 'fusible' resistors and a clamping diode as well as the correct type of coupling capacitor. That way if the cap fails, the current rises, flows through the clamp diode and safely burns out the resistor.
I will reiterate the need for 'self healing' Class X, or even better Class Y capacitors mentioned in other answers.
Even better, unless cost is really the driver, scrap this circuit and use a proper off line SMPS.
To answer your later question, "How the cap + resistor in parallel = DC" it does not.
A capacitor is like a frequency dependent resistor. As you probably understand two resistors in series across a voltage will produce a 'potted' down lower voltage at their centre.
This is just the same, but instead you get a lower AC voltage. The resistor in parallel with the cap is there to discharge the cap for safety reasons, it plays no part in the circuit operation. The other 'resistor' is the remains of the circuit, diodes etc.
You could do this with two resistors, rather than a 'resistor' and a capacitor, but you'd need a physically large resistors due to the power dissipated.
The cap solves this problem because it's reactance dissipates zero power (actually it has parasitic resistances which do dissipate a little power).
Think of it this way; A capacitors' reactance (AC resistance) is Zc=1/(2*PI*f*C) at 50Hz or 60Hz a 1nF capacitor will be about 3MOhm, so you'd get very little current through it at 120Vac.
This one is 1.2uF, so is about 2k2 Ohm at 60hz and it has 105V across it. If it were a resistor it would dissipate (V^2/R) = 5W, yet as a capacitor it dissipates virtually zero.
So we just get a smaller 'potted' AC voltage which we then rectify with diodes (D1, D2) (to remove the negative part of the cycle). Now we have (very lumpy) DC which can smooth with a capacitor and regulate. The last component is a 5V linear regulator. Z1 is there to protect the regulator from voltages spikes which make it through the coupling cap.