You're confusing a capital investment (the robots) with cost-of-goods-sold (the widgets). Automated manufacturing systems are complex systems that require highly trained individuals to maintain and operate, while reducing the total labor cost. In addition, if more manufacturing utilized these systems, scales of economy could be reached that would allow them to be more modular and commoditized.
Automated manufacturing systems are complex systems that require highly trained individuals to maintain and operate, while reducing the total labor cost.
For now.
Also, keep in mind that everything I said about it being economically undesirable to employ human labor in production goes out the window when there are a billion workers available who have nowhere to go but up. There is no (natural) law that says that our robots will be any more economical than low-cost Chinese workers, even though they might be more economical than high-cost American workers.
It's all "for now." Eventually we will exhaust the Earth's resources and possibly become enslaved by a race of artificial intelligence, but I'm not pretending to even think about solutions to those problems.
It'd also be cheaper to have slaves, but we don't do that either. The ends do not justify the means. In order for capitalism to be effective at increasing standard-of-living across the board and allocate resources and capital efficiently, it must be tempered with rules that set limits on what avenues are pursued for profit.