There's lots of reasons software developers in India and China would remain in India and China, but one big one is obtaining a visa and permanent residency to live and work in the US is hard in general, and more so for people in populous countries with many emigrants destined for the US; I think it's India, China, and Mexico that have the three longest queues for green cards where there's a limit per country of birth.
There's certainly a path to immigration through a computer science degree. Especially advanced degrees, which give preferences to visa applications. If you can afford it, get a bachelor's in your country of origin, come to the US for a Masters, work on OPT visa after graduation, hope it converts to H1B, work on H1B until you get a green card, is a well worn path, but there are others.