The reason was because those people worshipped idols, not because of race; the Hebrews, Amorites, Canaanites, etc. The apostle Paul encouraged Christians not to marry unbelievers (2 Corinthians ), but here again, the reason was religious, not racial.
2 Timothy - Flee also youthful lusts: but follow righteousness, faith, charity, peace, with them that call on the Lord out of a pure heart.2 Corinthians - Be ye not unequally yoked together with unbelievers: for what fellowship hath righteousness with unrighteousness? 1 Corinthians 13:4-7 - Charity suffereth long, [and] is kind; charity envieth not; charity vaunteth not itself, is not puffed up, 1 Corinthians - Be not deceived: evil communications corrupt good manners.
Song of Solomon 2:7 - I charge you, O ye daughters of Jerusalem, by the roes, and by the hinds of the field, that ye stir not up, nor awake [my] love, till he please.1 Thessalonians 4:3-5 - For this is the will of God, [even] your sanctification, that ye should abstain from fornication: 1 Corinthians - Flee fornication.
And he said to him, "You shall not take a wife of the daughters of Canaan. Arise, go to Padan Aram, to the house of Bethuel your mother's father.
And take a wife from there of the daughters of Laban your mother's brother" (Genesis 28:1 - 2, HBFV)The narrative jumps to Genesis 29 where Jacob fell head over heels in love with his cousin Rachel.
The tongue of the wise makes knowledge appealing, but the mouth of a fool belches out foolishness.