For it was of the LORD to harden their hearts to engage Israel in battle, so that they would be set apart for destruction and would receive no mercy, being annihilated as the LORD had commanded Moses.
The Canaanites' refusal to seek peace was their fatal blindness. God hardened hearts already bent on war; they chose enmity with Israel when they might have made terms, as Gibeon did. Hardness of heart is the sinner's ruin, and those left to their own stubborn pride are already marked for destruction.
AI summary
Commenting on Joshua 11:15-23
For it was of the Lord to harden their hearts,.... As he hardened the hearts of Pharaoh and the Egyptians, that his power might be displayed in their destruction: that they should come against Israel battle; and so fall in it: that he might destroy them utterly; for their abominable wickedness, idolatry, incest, &c.
For it was of the LORD to harden their hearts, that they should come against Israel in battle, that he might destroy them utterly, [and] that they might have no favour, but that he might destroy them, as the LORD commanded Moses. (l) That is, to give them over to themselves: and therefore they could not but rebel against God and seek their own destruction.