1 Peter 3:18 NKJV - "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."
Christ suffered a cruel death on the cross as the only One who was really JUST! He died in the place of the really unjust - all of humanity. This verse is a great passage to point to the substitutionary aspect of salvation. He took the sinners place on the cross. He took the sinner's sin as He took the sinner's place on the cross. He took the sinner's judgment for the sinner's sin as He took the sinner's place on the cross. Why? For the very reason He came to earth - to save the sinner from the their sin and to give them a right standing before God that He might bring them to God!
Note another verse that will someday be a "Daily Verse" - Jude verse 24 - "Now to Him who is able to keep you from stumbling, and to present you faithless before the presence of His glory with exceeding joy." Jesus wants you in heaven! And He did what had to be done for that to happen. He died as the "sinner on the cross" in order to bring the justified person to His Father in heaven.
It wasn't that He just wanted to get the sin out of you. He wanted to get His righteousness into you! And He wanted to get you into heaven with Him! Praise His Name!