The X2 capacitor takes care of the high surge pulses up to 1kV.
This reduces the risk for shocking the LED-engine in setups with unstable electrical currents.