God told Israel to destroy all idols in the land.
GOD told Israel, as they found idols in the land of Canaan, to destroy them:
25 You shall burn the carved images of their gods with fire; you shall not desire the silver or gold of theirs, nor take it for yourselves, lest you stumble because of it; for it is an abomination to the Lord your God. 26 Nor shall you bring an abomination into your house, lest you be doomed to destruction like it. You shall utterly detest it and utterly abhor it, for it is an accursed thing.Deuteronomy 7:25-26 OSB
The Canaanites had devolved into great wickedness, including—and in conjunction with—the worship of their gods. Idol-making and worship accompanied this sin. Israel’s mission was to purge these from the land.
Ridding the land of these idols would contribute towards Israel’s faithfulness because Israel wouldn’t be tempted to imitate the evil practices of the Canaanites.