Though God is immutable (Malachi 3:6), His character is demonstrated very differently upon different people. Romans 11:22 describes this phenomenon well, "Behold the goodness and severity of God: on them which fell, severity; but toward you, goodness, if you continue in His goodness: otherwise you also will be cut off." In Deuteronomy 7 we see, in strong contrast, the goodness of God toward His children... and the incredible severity of God toward His enemies.
Why is this important for us? Well, think of this... generally Christians think of God as primarily holy, just and ridged in the Old Testament, but gracious, merciful and generous in the New Testament. And, in some ways, I suppose that there is some truth in that perspective. But, let's not forget Revelation. Of course, there are many places in the NT... even in the Gospels ... where the wrath and judgment of God is emphasized, but John's Apocalypse is the most obvious place where the worst serving of unfettered justice EVER to be meted out is described. In other words, as we preach "hell hot and heaven real" in these modern times, these OT accounts (of the relentlessness of God's wrath against sinners) are invaluable in demonstrating the fact that (though He doesn't enjoy punishing evildoers) God definitely has the staunchness necessary to divvy out damnation (Deuteronomy 7:10). If He did it in the past, we can certainly expect that He will do it in the future too.