One is that they can handle extremely high transient power levels. For example, maximum-effort braking at high speed can easily involve over a megawatt of power in the initial stages. Dumping that power into your brake pads and rotors as heat is fairly easy to manage. Dumping that into your battery without wrecking it is much, much harder. For comparison, a high-end Tesla can charge at up to 120kW, and can discharge around 600kW in short bursts.
The other advantage is that they're cheap, reliable, and can easily be built with redundancy. You can lose all of your car's computers and half of your brake hydraulics and still be able to stop the car.
In order to have no mechanical brakes at all, you'd need a battery that could charge fast enough to absorb the power of full braking at maximum speed, and a sufficiently redundant drivetrain that you could still make regen work even if major components failed.