This is a really good book about all kinds of similar situations:
Thomas Schelling: Micromotives and Macrobehavior
https://www.amazon.com/Micromotives-Macrobehavior-Thomas-C-S...
"In one famous example, Thomas C. Schelling shows that a slight-but-not-malicious preference to have neighbors of the same race eventually leads to completely segregated populations."