… is from page 503 of the 5th edition (2015) of Thomas Sowell’s Basic Economics  (original emphasis):
Theoretically, investments might be expected to flow from where capital is abundant to where it is in short supply, much like water seeking its own level. In a perfect world, wealthy nations would invest much more of their capital in poorer nations, where capital is more scarce and would therefore offer a higher rate of return. However, in the highly imperfect world that we live in, that is by no means what usually happens. For example, out of a worldwide total of about $21 trillion in international bank loans in 2012, only about $2.5 trillion went to poor countries – less than twelve percent. Out of nearly $6 trillion in international investment securities, less than $400 billion went to poor countries, less than 7 percent. In short, rich countries tend to invest in rich countries.
DBx: One of the countless enduring myths about free trade is that, without tariff barriers separating high-wage (or rich) countries from low-wage (or poor) countries, not only will all (or most) investment flow to low-wage countries, it will flow out of high-wage countries. For example, why would a corporation keep its steel factory in the United States if, were it to move its production facilities to Mexico where wages are much lower than they are in the U.S, it can sell without any barriers its foreign-produced steel in the United States? Such a move is a no-brainer! – or so suppose people who use no brains when thinking about trade. (A famous example of this sort of ‘analysis’ is Ross Perot’s warning, during the 1992 U.S. presidential campaign, that freer trade with Mexico and other low-wage countries will create “a giant sucking sound”  of investment, jobs, and economic activity swooping from the U.S. into Mexico.)
There are too many fallacies, to cover here, with the notion that low-wage countries have a terrific advantage over high-wage countries at attracting investment in a world of free and open trade. And so I mention only two of these fallacies.
First, wages largely reflect worker productivity . And so because another name for low-wage workers is “low-productivity workers,” such workers obviously have no universal advantage over high-wage – that is, “high-productivity” – workers. (Here’s one of my attempts  from a few years ago to explain this reality.)
Second, even if in certain circumstances wages are generally lower than are the productivities of workers earning those low wages, wages are not the only determinant of where production is best located. Suppose you’re an investor who knows for a fact that workers in Ruritania are generally underpaid relative to their productivity. But suppose that you also suspect that the government of Ruritania will likely expropriate any investments that you put in place there. You’ll not invest in Ruritania. (An alternative way to think of this hypothetical example is to factor the expected predation of the Ruritanian government into the calculation of worker productivity. The risk of such predation lowers the expected productivity of Ruritanian workers, likely down to the level of the actual wages those workers are paid.)
More generally, labor is only one of many inputs in production, and wages are only one of many costs of production. This undeniable reality is overlooked by those people who argue that, with freer trade, low-wage countries will attract all or most global investments. Yet this oversight makes no more sense than does the oversight of someone who, upon seeing that a certain restaurant charges unusually low prices for cups of coffee, argues that that restaurant will capture all or most of the restaurant business. Ignored here is the quality of this restaurant’s coffee as well as the prices of the many other items on that restaurant’s menu.