The robots would never be built if the capitalist system didn't provide the incentive and rewards for innovating the products (robots) needed by society.
Capitalist system DO provide a lot of incentive to develop robots because they almost guaranteed will be sold with a profit if their cost + maintenance will be lower than workers' wages (including perks, insurance premiums, taxes etc).