At one time, all of mankind was of one color, one race, and one language. From Adam to the flood, that homogenous makeup of man is likely what led to his extreme rebellion against God. The Lord described man this way: "that every inclination of the thoughts of the human heart was only evil all the time" (Genesis 6:5). God even "repented" that He had made man. Thus, the flood wiped everyone out, save for eight people - Noah and his family. But they and their descendants were still the same race. God told them, upon leaving the ark, to "fill the earth" (Genesis 9:1). But, we find in Genesis 11 that man chose to stay in one area: "Now the whole world had one language and a common speech.
As people moved eastward, they found a plain in Shinar and settled there." It was there that they built the "tower of babel" so that they could "reach the heavens" and "make a name for themselves". Take a moment to consider what the Lord might have been thinking. "Here we go again?" In fact, He said, "If as one people speaking the same language they have begun to do this, then nothing they plan to do will be impossible for them. Come, let us go down and confuse their language so they will not understand each other." (Genesis 11:6-7). And so that is what the Lord did: He changed their language.
I believe, for the sake of mitigating the immediate confusion and panic that would ensue from hundreds of thousands, maybe millions of people, suddenly unable to understand each other, that the Lord also changed their race at the same time. With common color and features, they would more easily identify their common people and from that they scattered as God wanted in the first place. Thus, race differences are ordained by God and they have a purpose: to make people less likely to band together to fight against God. Competing and striving with each other then was preferable to fighting with God. It is somewhat natural for different races and cultures to have even a small amount of mistrust and suspicion of each other, though through Jesus, people of all colors and languages are brothers and sisters in Christ.