The Bible teaches that God is love. It also says He cannot allow sin in His presence, and that all people are sinners. That presents a problem – not just for mankind, but for God. He wants a relationship with His creation, but the sinful human nature makes that impossible.
Except that with God, nothing is impossible.
The solution is simple … God forgives. As He told Isaiah: “I am the one who wipes out your transgressions for My own sake, and I will not remember your sins.”
“For My own sake,” God said. That’s why He provides atonement. It resolves His dilemma. It works out pretty well for the rest of us, too.