In Feudal days certain specific laws were passed across much of Europe in varous countries that would prevent peasants moving from one Manor holding to the next. This was an attempt to ensure wages suppressed and the peasant could not simply move to a Manor holding that was wealthier and paid a better wage. After the Black death this broke down to an extent as there was severe labor shortage . The Lords turned on one another for that labor and life in fact got better for the peasant in time. Once the population grew again further laws were passed to prevent peasants from relocating.
Under the Feudal system the Lord of a given manor and land holding did not invest his Capital in anothers holding to any great extent. All of his wealth came from his own lands. As capitalism displaced Feudalism , that excess capital was used as investment abroad. As Capitalism "evolved" and the concept of private property entrenched across much of the globe , the investor felt much safer about such investments and would seek out areas means by which profit could be maximized. One of these of course was slavery wherein the labor shortage in the New World drove the drive towards "forced labor" and servitude. Some suggest that the entire Industrial revolution in England was financed by the use of slaves in the colonies abroad.
Modern Capitalism and the usage of the debt system is a form of slavery reworked to make it appear to be moral and acceptable. Just as the old Nobility could not allow their work force to seek better opportunity abroad if they found they ill treated in the holding they resided in, the modern Nobility NEEDS those borders to ensure labor can not freely follow the Capital and jobs. Worldwide there a labor surplus. This is used by the capitalist system and laws that allow capital free movement across borders to suppress wages and maximize returns. Where workers in one country might have gained some sort of leverage with the owner class wherein they have a better wage or more protections, capital moves to an area where no such protections exist weakening the collective power of the workers in the former.
The concept of no borders whereby people can move freely from one area to the next is something Capitalism loathe to allow. It empowers the worker. If there are relocations of the workers allowed, it the Capitalists who want to be in charge of who gets to move where. A Capitalists return on investment trumps everything.