In this circuit what is the function of this resistance in parallel with a capacitor
It is most likely a high value resistor to discharge the capacitor when the circuit is disconnected from the mains AC supply. This is purely for safety and not functionally required for the circuit.