“Sin,” the Westminster Shorter Catechism tells us, “is any want (lack) of conformity unto, or transgression of, the law of God” (Q&A 14). To an infinitely holy and righteous God, any such lack or transgression is infinitely detestable and deserves, in fact requires, eternal punishment. God is to pure to look upon evil, and his perfect justice requires that sin, any sin, be so punished.
That is why the death of Jesus Christ is so important, because it was in that act that Jesus bore the curse of sin in the place of those who believe in him. He took on himself God’s wrath against our sin. He set himself as a substitute for believing sinners. It is only in that way that God’s holiness, his justice, and his grace to sinners could come together.