Here's why you might consider replacing the ABS sensor:
* Accidental Damage: The ABS sensor is a delicate component. If it's bumped, scraped, or otherwise mishandled during the bearing replacement, it can become damaged and malfunction, triggering the ABS light.
* Pre-existing Issue: The ABS light might have been on *before* you started the bearing replacement. The faulty bearing might have been causing vibrations that affected the sensor, or the sensor itself might have been failing independently. Replacing the bearing might not solve the ABS light problem if the sensor is already bad.
In short: It's not mandatory, but it's *prudent* to inspect the ABS sensor carefully during the wheel bearing replacement. If it shows any signs of damage (broken wires, scratches, etc.), it's best to replace it to avoid future problems. If the ABS light remains on after the bearing replacement, you'll likely need to diagnose and fix the ABS sensor separately.