I think it's more than just that kind of thing.
In any part of the world, unless it is a sort of tourist destination, you will almost certainly find far more ethnic diversity, and people who have come from other parts of the world, in cities. That includes people who have no reason to be afraid of going into the countryside. If you venture into the countryside in Japan, or Botswana, or Pakistan, how many of the people will be from some other place? Not many, generally speaking.
I always think of my friend who went to work in a tiny village in a southern part of Africa. It took two days to drive there, and many of the younger people had never met a white person. Which is fine, I think?
It's also very common for newer groups in a country, even after a few generations, if they originally came to cities, to stay in cities. Sure, some individuals may not, but a lot will. As do many of the people who are born in those same cities - some leave for the countryside, but most don't. - they are more likely to do to other cities and towns.
There are a lot of reasons for that, including concentration of services, jobs, and other people with a similar cultural background. And people have a tendency to stay where they arrive if they find work, and also many people prefer to stay close to family. Religious communities for some may be more difficult to access outside of larger towns and cities too, and that can really influence where people will move to.
But I think the underlying reason is the mass movement in many countries of people from rural areas into cities. Rural areas have lost many families over the years, and big cities have sucked them up, mainly due to economic changes. Why would we expect people who are more recent arrivals would be different and be moving into the countryside in large numbers?
Do we really want every place to look the same? The thing is, I've never heard anyone say that rural Botswana needs to become more racially diverse, or that the fact that it isn't shows they are racists. There's a real double standard.