i'm not sure about segregation (which is the forced separation of peoples based on race, religion, etc. all being cultural and/or ethnic factors), but if you read the story with an unbiased eye, it looks like G-d decided that when all peoples have a uniform purpose, they will eventually turn on Him...so He sprinkled some competition into the world, so that each society would try being better than the other. You see His wisdom in practice: as countries tend to more socialist and communist economies, the populace becomes more atheist; on the other hand, capitalist countries for some reason tend to be more religious.