It was to show his righteousness at the present time, so that he might be just and the justifier of the one who has faith in Jesus. (Romans 3:26 ESV)
"At the heart of the gospel is a double imputation. My sin is imputed to Jesus. His righteousness is imputed to me. And in this two-fold transaction we see that God -- who does not negotiate sin, who doesn't compromise his own integrity with our salvation, but rather punishes sin fully and really, after it has been imputed to Jesus -- retains his own righteousness, and so he is both just and the justifier, as the Apostle tells us here. So, my sin goes to Jesus; his righteousness comes to me, in the sight of God... This is the article upon which the church stands or falls."
~ R. C. Sproul, "The Protestant View of Justification" in the series, "Luther and the Reformation"