In Judges 2:12 and Judges 2:14, God is indignant at Israel’s transgression of his covenant. But Israel’s offence did not catch him off guard; he had warned
and had sworn
that he would be against them (Judges 2:15). That was in Deuteronomy 31:16–17, Deuteronomy 31:19, Deuteronomy 31:29. So here we have a case where God foreknows, forewarns, and foretells what will happen in terms of Israel’s committing idolatry. And then, in fidelity to his promise, God responds to that provocation at the time of its occurrence just as he said he would…. In other words, the sin certainly and rightly provokes God’s anger in view of the transgression of the covenant, but the provocation is not a surprise to God…. His anger, once again, is a perfectly fitted response to sin against his glory, and thus it is nothing like our experience of flying off the handle.
1
15 Whenever they marched out, the hand of the LORD was against them for harm, as the LORD had warned, and as the LORD had sworn to them. And they were in terrible distress.