They often fail from repeated switching surges, or from mains noise that was clamped by a varistor placed after the resistor, or from high frequency noise that was absorbed by the mains filter. Generally they are designed to fail with a surge overload of a few seconds, so they operate safely and do not heat up to cause a fire hazard.