Peter Pett's Commentary on the Bible
Joshua 23:12,13
“ Or else if you in any way go back, and cleave to the remnant of these nations, those who remain among you, and make marriages with them, and go in to them, and they to you, know for a certainty that YHWH your God will no more drive out these nations from before you, but they will be a snare and a trap to you, and a scourge in your sides, and a thorn in your eyes, until you perish from off this good land, which YHWH your God has given you.”
This was the alternative, to love the ways of Canaan, to intermarry with them, to trade with them, which would result in the destruction of their morality and of their faith. This was no idle threat. The Canaanites were a degraded people whose perversions and sexual excesses were a byword. To associate with them would finally result in becoming like them. Thus when we read that ‘they subjected them to tribute (or put them to taskwork) but did not drive them out' (Joshua 16:10; Joshua 17:13; Judges 1:28; Judges 1:32) our hearts grow cold, for we know that it is the beginning of their downfall. And we are not surprised at what follows. Indeed the only thing that surprises us is that God did not desert them completely.
“Cleave to the remnant of those nations, those who remain among you.” The phrase stresses that the speaker is aware of the way they have decimated the Canaanites in their various battles (‘the remnant of those nations'), but warns that he is aware of how dangerous such a remnant can be when they are as sinful as the Canaanites. It was not enough to win the battles, they must win the war, and that involved a total driving out of the Canaanites. They were not fit to be lived among. See Exodus 34:12.
“And make marriages with them.” Compare Exodus 34:16; Deuteronomy 7:3. See also Numbers 25:1; 1 Kings 11:1 for practical examples.
“And go in to them, and they to you.” Sharing companionship and relationship both in daily life and in trade. The result would be that they learned their ways and listened to their advice, and that would destroy them. How often would a Canaanite point out that if only they paid heed to Baal and made some kind of offering to him, their lands would be more fruitful and the rain would be more plentiful, for he was the god of rain and of the land. In times of drought that would seem an attractive option and it would lead into the degradations of Baalism.
“Know for a certainty that YHWH your God will no more drive out these nations from before you, but they will be a snare and a trap to you, and a scourge in your sides, and a thorn in your eyes,.” This vivid description pictures accurately what the Canaanites would become to them with their sophisticated ways and their perverted immorality, and the moment that Israel began to compromise with them they sealed their own doom. God would no longer be active on their behalf. His promises depended on cooperation. However in the last analysis God would fulfil His promises, for in the end they depended on His grace and not man's deserving, and it would be by bringing about cooperation, but if they were unfaithful now that would be in the distant future.
“A snare and a trap”, and they walked into it as Samson walked in to Delilah. When it comes to morality compromise is fatal. That is why Paul said to Timothy, ‘flee youthful desires' (2 Timothy 2:22). Do not stand and fight them, run!
These vivid pictures are mainly taken from Exodus 23:33; Exodus 34:12; Deuteronomy 7:16; Numbers 33:55. Joshua knew the Law well. The word for ‘scourge' is used uniquely here and its meaning is uncertain, but it was clearly something unpleasant and is related to a word for whip (1 Kings 12:11; 1 Kings 12:14). LXX ‘nails in your heels' is probably a guess. ‘A thorn in your eyes.' Something pointed which pierces and therefore a thorn (Job 5:5; Proverbs 22:5), or possibly a hook or barb (Amos 4:2). But the idea is clear, they will cause grief and anguish.
“Until you perish from off this good land, which YHWH your God has given you.” It was the Canaanites who should perish off ‘this good land' (Deuteronomy 7:20) but if Israel failed to obey God's Law they would bring the curse on themselves (Deuteronomy 28:20; Deuteronomy 28:22). They were only sacrosanct because they were His people, and they must show it by their lives.