For he hath made him to be sin for us, who knew no sin; that we might be made the righteousness of God in him.
2 Corinthians 5:21 (KJV)
On the cross Jesus was made sin for us so that we could be made the righteousness of God in Him. We did nothing to earn or deserve this, it is purely the gift of God’s unmerited favor. Understanding who we are in Christ enables us to live out of who He has called us to be.