“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
Tim Chester writes:
On the cross Jesus interposed himself. He stood in the way of God’s wrath. He took the full force of God’s judgement against sin. He absorbed the power of hell. So now nothing of God’s wrath gets through to us. In that act God justifies us, for our punishment is paid in full. And in that act God justifies himself, for there is punishment—the crime is not overlooked.
If God had simply declared us righteous, it would all be legal fiction. It would be a case of ‘Let’s pretend’. ‘Let’s pretend people are right when really they are wrong.’ We would be left with good reasons to suppose our salvation was a fiction, that we were not truly forgiven and not truly accepted by God. The verdict would be overturned on appeal. Because justice had not been done, the case would still be open. The threat of judgement would remain. But when God declares us right, even though we are wrong, he still acts rightly. Through the cross, we can be confident that we are right before him. (Crown of Thorns, pgs. 10-11)