A lot of people are trying to write more diverse worlds, but a lot of people are also perfectionists who need to know every detail and reason in their world. Here are some ways and explanations for creating a diverse world. This is geared toward pre-industrial and early industrial societies.
Trade: Trade can do wonders. Trade is how your characters get rare fabrics, different foods, knowledge of other cultures, knowledge of other languages, cultural diffusion, and more. Trade can occur over land or over water. You can get characters to travel halfway around the world. You can have trade posts near major cities. Groups of traders who travel over land can go through cities, towns, and tiny villages. Entire cultures can be centered around trade and they can have influence on many parts of your world.
Exile: This can make for some interesting stories for characters. Using exile can put entire families or even whole groups of people (ethnic groups, religious groups, a village, etc.) in faraway lands where they’ll probably stay for a long time. Means of exile can vary. They might have been banished from their land or a natural disaster could have forced them to move.
Hiding: Like exile, you can uproot characters and place them in another place while also coming up with an interesting back story for why they are hiding. This can also reveal a bit about your world. If there are several people in hiding from one particular place, what does that say about the relationship between these two places or these places themselves (i.e., corruptness, law, freedom, etc.)?
Politics: Political rulers are not confined to their homes. They can travel to other nations for political or personal reasons. They might need to discuss political matters with another ruler or they might be guests at a party. There are also political marriages or children of political leaders who live elsewhere as a ward.
War: War, past or present, can bring people to your setting. Some people might be refugees, some might be descendants of prisoners of war, and some might be allies. Or, a past war could have acquired more land and the people who were there, making them citizens of the new nation post-war (depending on the rules of citizenship). Whether they’re citizens or not, they’re still in the same nation and it’s likely some will travel to major cities or elsewhere within the nation’s borders. There can also be forts and camps for a military of another nation.
Education: Does your setting have some type of prestigious school? If schools are few, ones like these can attract the rich, powerful, and/or connected from several surrounding areas. Even if there are several schools a prestigious one can still attract many people.
Religion: Some religions have a goal of spreading their beliefs, so you can bring that into your world. Other times, if there is something of religious significance in your setting, religious people may travel there on a regular basis. Those who spread religion might travel on similar routes of traders (or they might be the traders) to talk about their religion. Or there might be places where religious leaders gather and live.
Exploration: You can get some explorers, or even just wandering travelers, to go to faraway places in search of resources, people, enlightenment, religion, important objects, and more. Another option would be researchers.
Festivals and Ceremonies: These can be tied to religion, history, politics, and many other things. Large celebrations can bring tons of people to one place, whether it’s in a city or not. If you’ve got something like this in your story, take advantage of it to introduce new people and cultures.