system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5/How does gut flora vary from country to country and from first world to third world countries?

On one hand you’d think it’s better in richer countries that have less disease. On the other hand, people in third world countries seem capable of eating some things first world country people can’t handle. 
So my guess is it’s a mix of things? I’m wondering how it plays out. 
I looked it up and what I found was either way over my head or very specific to one spot. 
Thank you.
gpt
How is kind of a broad question. Lets first answer why.

The gut microbiota develop mainly right after birth. During birth, breastfeeding etc the infants gut gets populated with microorganisms. The parents microbiota are well adapted to local conditions and get passed onto the child. During childhood those microorganisms and our body learn to cooperate and deal with local food and other microorganisms that are present there. 

Obviously, if you move across the world both your body and your microbiota are suddenly panicked. They have to deal with food they have never seen and have to deal with microorganisms they have never encountered. This frequently sends the signal: "We might be getting food poisoning!" and the body flushes your gut resulting in a diarrhea. 

Some places have more/different local microorganisms. If say, you are from Europe you might be used to microorganisms X and Y. Your body knows how to deal with them or knows they are harmless. If a European then goes on a trip to Egypt, where X, Y and Z are common, you might expect frequent visits to the toiler. This happens so often some people refer to it as the "Curse of the pharaohs"!

On the other hand, the Egyptian natives moving to Europe would already be used to X and Y, while Z is simply not present, so the risk of getting a diarrhea is smaller for them. If they stay in Europe for a long time though, their body might forget about Z and panic if they ever move back.