God’s ultimate purpose at the Tower of Babel (Genesis 10-11) and the creation of ethnicities and languages – for His people to reach out to those different nations (Genesis 12:3; 22:18; Psalm 67; 96:3, Isaiah 49:6; Matthew 28:19), because He gets greater glory by bringing gospel unity in diversity. (Acts 17:26; Revelation 5:9; 7:9)
Here is an excellent short explanation of the Tower of Babel and the beginning of the different ethnicities in the world. We are all one human race, brothers and sisters of one another and we all descended from Adam and Eve; and we all descended from the three sons of Noah and their wives. The genetic code for all the nations and ethnicities was all within the three sons of Noah and their wives.