If only eight people were on the ark, where did the races come from?

The census of those on the ark included Noah, Shem, Ham, and Japheth, Noah’s wife, and the three wives of his sons (Genesis 7:13). With these four men and four women, the earth was repopulated after the flood.