I am a few years away from my undergraduate classical civilization degree, but I can give a general answer from memory. I assume you are referring to Ancient Greece and the numerous colonies they set up around the Mediterranean. I believe that generally people left to found new cities because of political strife in the home city, or lack of space. Over population in city-states would lead to people moving so they could have more land and opportunity. Colonies also generally maintained close ties to their mother city which they came from, so they could have set out in an attempt to increase the strength of their home city while finding more opportunities for themselves individually. Herodotus has an interest history of the Greek World, and of course a lot of it is embellished and not necessarily true, he gives examples of groups from city states in Greece leaving to find new cities in North Africa and the rest of the Mediterranean. There is an example I am thinking of, of a Greek named Batus (maybe), who went to the Oracle at Delphi and they told him to go find a colony in Cyrene in North Africa (at least that is the gist of the story, there are plenty of details in the timeline I am missing out). But this is interesting because it shows that colony establishment was supported. I have crazy theories like maybe one of his rivals back home bribed the oracle to tell him to high tail it out of town and make a city elsewhere, but who knows. Mostly though I think people left cities because of political conflicts and because of over population in the cities and in a new city they could find more opportunities. I know I focused more on people leaving to create new cities and you asked about moving to other cities, but I assume the principles would be the same. I am sure there would be some problems with resources and technologies, but I think most people underestimate how connected the ancient world was and clearly it was possible to move to different locations and set up cities. The most important part was probably bringing along the people with the knowledge rather than particular resources. But anyways, that is my rant to feel good about my lingering ancient history knowledge.