The entire world was relatively borderess prior to 20th century, and it was completely outside of humanly possible for the state anywhere to keep tap on every individual.
If you talk about the period from medieval, to early renaissance. It was very natural for every polity to want to get more subjects. Feudal lords couldn't have been more happy to see more people migrating to their domains.
Things started changed with appearance of early nation state model in late renaissance. The more central the role of the nation state got, the further right was the centre of power.
All of the above culminated with introduction of the visa system in Europe, shortly prior to WWII, which was later adopted by nearly all nations around the world.