I agree completely with you that 'Western corporates don't go outsourcing in India for the talent'; they go to India primarily for cheaper resources. But there are secondary consequences to this outsourcing: cheaper resources in India working on the same product for a year get enough training to understand the code base. In the Western corporate world, every company wants to hire a rockstar with all those leetcode hard questions, etc. In Indian outsourcing environment, if someone is willing to learn, willing to work for less, knows how to solve fizz buzz and other problems, he/she gets hired. With the lower pay, the management doesn't expect them to be rockstars, these devs with lower-pay even according to Indian standards are getting free training by doing maintenance. After a while, they can contribute to the code base. That's why you see so many developers who worked at WITCH companies on behalf of clients like Cisco, have become good network development engineers, moved to USA, and working for tech giants.
In India, because of different levels of pay, one can get trained for first few years by working for cheap companies. Once they hone skills, they go for companies that pay them top: companies even below WITCH -> WITCH -> American companies in India -> American companies in America; that's how the pipeline works there. In the states, this pipeline is completely gutted: every company wants rockstars or hires fresh grads from select schools.