Outsourcing programming and other functions to developing countries became popular early in the 21st century and is partly responsible for the economic boom that led India to become richer than the UK. The push to outsourcing was driven by a number of factors, including standard advice in management and business training, a desire to reduce costs at all costs, the fact some astute individuals doubtless adopted advocacy of outsourcing as a smart career move, the breakup of the Soviet Union and on the political front, in the UK at least, the capture of Government by big business and politically correct guilt that the UK had ever had an Empire.
In the headlong rush to outsource and offshore a number of risks, still not fully recognised, were not ignored but not even seen. Some of this blindness seems to have been caused by unconscious xenophobic arrogance and some by an academic Ivory Tower approach to business that neglected the fact Business is a human activity and that human activities, individually and collectively lack the elegance of an academic theory, instead exhibiting a glorious messiness and tendency to fool the experts.
The link above goes into more details