"God made Him who had no sin to be sin for us, so that in Him we might become the righteousness of God."
-2 Corinthians 5.21
Here's mathematical problem for you to solve:
God likes ONLY 100% Righteousness/Goodness, Humankind = 97% Righteousness/Goodness
If God wants to be friends with Humankind without going back on His standard, how does He do it?
God puts himself, in the body of a man, Jesus = 100% Righteousness
God takes all of humankind's unrighteousness and swaps it for Jesus' righteousness, so that now it looks like this;
Humankind through Jesus = 100% Righteousness
"...the LORD has laid on Him
the iniquity of us all."
This is salvation.
God can't fellowship with anything that is not 100% good, even if it's only 3% bad. [2 Corinthians 6.14]. But God wants to be in a relationship with us. So to provide a solution to this problem, He sent Jesus who is fully good, to take all our sin, so that we could be 100% good, and He could have a relationship with us.
And because of this; because of Christ's atonement for our sins, no matter what our past before Jesus, or what sins we have committed or even have yet to commit, God extends the arm of kindness, love and graciousness to us, so that instead of perishing and facing eternal separation from Him, we have eternity with Him.
"For God so loved the world that He gave His one and only Son, that whoever believes in Him shall not perish but have eternal life."