In 1 Peter 3:18 we read, “For Christ also suffered once for sins, the just for the unjust, that He might bring us to God, being put to death in the flesh but made alive by the Spirit.”
Here we get the general principle. God is wrathful towards sin. We are guilty of sin. But Christ is innocent of sin, and dies in our place as a sacrifice for our sins. Christ’s sacrifice propitiates God’s wrath for our sin. We get a basic answer to our question. What we don’t get are all the details. Why is the punishment of those who reject Christ everlasting? How is Christ able to propitiate God’s wrath with a comparatively short time on the cross? As I said, we don’t have all the details, but God has revealed enough to give us the overall picture. The just for the unjust.
Once again, I believe God has withheld some information in order to preserve free will. If we knew everything about the atonement, perhaps it would overwhelm us, compelling belief in those who would otherwise reject Jesus.