Look at history,
Castles and walls were built to keep raiders out and defend people inside. Walled cities go back to the early chapters in the bible.
Large groups of people moved all over europe (Celts, Romans, Vikings, Goths, Visa Goths, Francs, Hun, Turks, Persians, Moors and Mongols)
Some moved cause they wanted to expand their dominance, some were exploring, some were raiding, some were forced, some looking for greener fields, and some were fleeing. Walled cities were developed to protect the people and goods the raiders wanted.
If society breaks down, Government goes under like in the days ending the Roman Empire, people leaving the cities will band together and move somewhere, trading, steeling, or taking with force items they want or need to survive.
Think of what you would do to get off Hawaii with your family. Steal a sail boat? Steal supplies? Forcably take a boat that is already loaded with enough stuff to sail the 3,000 miles from there to here?
Now what do you think a few million people living in NYC, Los Angeles, San Francisco, Dallas, Atlanta, or other city will be willing to do to survive and get to someplace they think is safe, with a food source and fresh water.