The ABS sensor O-ring seals the gap where the sensor enters the hub or knuckle. It keeps water, salt, and dirt away from the tone ring. This prevents rust buildup on the tone ring teeth. If the O-ring dries out and cracks, moisture will enter and cause the tone ring to rust.
Always check the O-ring when installing a new sensor. Lubricate it with a tiny bit of grease to help it slide in. Pushing a dry O-ring into the bore can pinch and tear the rubber.