Elohim is not only the Elohim of justice but also the Elohim of mercy. Both His justice toward those who willfully disobey Him and His mercy toward those who respect Him enough to seek His help so they may obey Him are expressed in the second of His Ten Commandments.
It ends with these words: "For I, the LORD your Elohim, am a jealous Elohim, visiting the iniquity of the fathers on the children to the third and fourth generations of those who hate Me, but showing mercy to thousands [or, to the thousandth generation, NRSV], to those who love Me and keep My commandments" (Exodus 20:5-6).
Elohim balances justice with mercy by considering what is in the heart—whether there remains any possibility of repentance. So long as that possibility exists, Elohim is "not willing that any should perish but that all should come to repentance" (2 Peter 3:9). But there will come a time when those who refuse to repent will perish.
That is why the New Covenant administration of Elohim's law considers first the attitude of the one who has sinned. One who is willing to "sin no more" is eligible for mercy instead of condemnation. But to those who choose to continue sinning Yeshua says, "Unless you repent, you will all likewise perish" (Luke 13:3).