Robots can be optimized for tasks and if they are, their benefits are greater. When cars replaced the horse, it was because they didn’t poop, and because a car designed only for transport would not suddenly have a heart attack and stop working.
In Manhattan in 1900, 400 horses would die a day, and a rotting horse carcass is a far bigger sanitation problem than a broken down car, which you can tow and fix up.