Christ's death for us is how and why God declares us righteous. Christ's righteousness is imputed to us as free gift.
It would be better, we imagine, if God treats us and others as we deserve. Those who believe they're faithful, pious, or good dedicate themselves, with God's help, to becoming better so that they can earn heavenly reward, an increase of earthly blessings, and the like. Those who believe they're not faithful enough, not pious enough, not dedicated enough to God in their Christian life will eventually give up on themselves because they believe—in relation to God—they're a lost cause. Either way, as appealing as it may be to us, when we imagine that God treats us as we imagine we deserve it leads us not toward God, but away from God and toward self-righteous pride or self-loathing hopelessness. God is gracious toward us only because of Jesus' bloody suffering and death. Our deserving has nothing to do with it. Christ's death for us is how and why God declares us righteous. Christ's righteousness is imputed to us as free gift. Then, on the Last Day, those in Christ don't get what they deserve—whether for their goodness or badness—they get what they don't deserve. They will be fed, and given drink, and sheltered in God's cruciform love forever. In fact, for Christians, at the Last Day, they're so wrapped up in Christ they don't even know what they've done, only what Christ does for them.
In the preaching of the Gospel of Jesus is not a Christian's reward, which isn't what he's deserved, but his undeserved reward. The Gospel is all gift from God's fatherly hand delivered to us for Christ's sake. This preaching is what distinguishes the church from a world whose standard way of operating, religious or otherwise, is earning and deserving. The church is distinguished from all other worldly organizations because it preaches the opposite message—a message entirely alien to our fallen way of life. Only in this way is the church recognized as the church.
God doesn't treat us and others as we deserve. Those who believe themselves faithful, pious, and good He declares: "I never knew you." Those who are hopeless, who've given up on themselves, our Heavenly Father declares: "Behold, the Lamb of God who takes away the sin of the world."
When we imagine that we and others get what we deserve from God, we cut ourselves loose from where God starts. He begins with Christ crucified for us. His judgment for us is instead delivered to Jesus in His undeserved bloody suffering and death. That's God's final Word on the matter of our deserving.
God's gift to us of what we don't deserve, for Jesus' sake—forgiveness, life, and eternal salvation—is the scandalous message of the Church. It's the message that on account of Christ, God declares us righteous and that His righteousness is imputed to us, utterly contrary to what we deserve. It is this hope in the salvation bought and paid for by Jesus' blood that is truly our one and only hope.