Machines can work 24/7, don't get sick, don't get lazy, don't need training, don't need to be fed, etc.
Even in a world where slave labor was cheaper, machines were obviously better. Fewer people could produce the same output no matter how you look at it.