Today we prefer to think of God’s mercy, love and grace. He is all that, but He is also holy and has provided a way for His people to be holy. His holiness requires that He punish sin, especially the sin of unbelief. Worship of anything or anyone other than YHWH will arouse His jealousy and result in judgment.
Deuteronomy 29: 20-23
“The Lord would not spare him; for then the anger of the Lord and His jealousy would burn against that man, and every curse that is written in this book would settle on him, and the Lord would blot out his name from under heaven. And the Lord would separate him from all the tribes of Israel for adversity, according to all the curses of the covenant that are written in this Book of the Law, so that the coming generation of your children who rise up after you, and the foreigner who comes from a far land, would say, when they see the plagues of that land and the sicknesses which the Lord has laid on it:
‘The whole land is brimstone, salt, and burning; it is not sown, nor does it bear, nor does any grass grow there, like the overthrow of Sodom and Gomorrah, Admah, and Zeboiim, which the Lord overthrew in His anger and His wrath.’