
There was a danger Israel faced that could quickly lead to the loss of all they'd gained. Joshua warns the leaders of Israel that associating with and intermarrying members of the surrounding nations will bring disaster upon them. It would lead to Israel getting involved in idolatry, violating their covenant with God.
There are critical lessons for followers of Jesus in this passage. We, too, can face spiritual dangers in associating with or forming connections with unbelievers. We need to make some clear decisions about our relationships with unbelievers just as Israel did.