From my experience of outsourcing to India, they give those juniors a real, paid projects to learn on and do very little babysitting and quality control on the code produced, reducing their costs, so they're still making them money while learning - but that results in poorly written code and creates all sorts of problems for clients.