These days though, there is no unclaimed land or unpopulated place to move in to. Practically speaking anyway. No one would want to move into the Yucatan jungles or Boreal Siberia even if the host countries invited them in to settle land.
That is the same situation that exists today. Might makes right is the only rule of nature. Treaties are just hopes that someone will help with defending your borders.
See Russia expanding its borders into what was previously recognized as Ukraine.
In the past you had lots and lots of peoples who just got erased as modern concepts of fairness and justice didn’t work the same way. See the warring states period.
What that means is that all of the "run[ning] away" you are talking about is still violently displacing native peoples. So for example, when the Boers flee the Cape Colony to the Transvaal, they aren't moving to virgin, empty land, but rather land inhabited by native Africans (Zulu, I think), who needed to be dispossessed of their land. And such dispossession tends to require violence.
After all there was no "industry" it was 95% + agrarian, pescatarian, pastoral. Many populations had a preference for coastal, riparian settlements and mountainous areas were less favored... but were where displaced peoples could move to. People clumped, they were not evenly distributed so any region would have unsettled areas --just like today you have vast areas in Alaska that are not populated -even Wyoming. There are towns here and there but most areas of those states are not "populated" though they are under local, state and federal control. Government did not work that way back a few hundred years ago.
The Zulu only relatively recently moved into ZA (around the same time as Europeans maybe a bit before --the Khoisan are the native peoples of ZA).
The Western Roman Empire was invaded by people who were fleeing other invaders.