“Even though we have sinned and desecrate the glory of God, Jesus has been bruised to repair the injury we have done to God’s glory. The iniquity of us all has been laid on him. This means that when we take refuge in him, we appeal for salvation not on the basis of our track record, which has fallen so short of God’s glory, but on the basis of Jesus’ vindication of the Father’s glory. In this way, even though we are sinners who have dishonored God’s glory, the glory of God becomes the foundation of our appeal—for we are hiding in the one who lived and died and rose again to glorify the passion of God for his name and the mercy of God to save.
This is what the little word just means in 1 John 1:9: “If we confess our sins, he is faithful and just, and will forgive our sins, and cleanse us from all unrighteousness.” This text says God would be unjust (not merely unmerciful) not to forgive us if we confess our sins.
Why is that? Why is forgiveness now a matter of justice and not merely a matter of mercy?
The answer is that Jesus has shed his blood (1 John 1:7) to make a just recompense for all who confess their sins and take refuge in him. Thus God would be unjust not to forgive them, not because they have honored him by their sinless lives, but because they take refuge in the name of Jesus.
The death of Jesus so honored the Father and so vindicated the glory of his name that God is bound by his justice, not just his mercy, to forgive all who stake their lives on the worth of Jesus. “Your sins are forgiven for the sake of his name,” (1 John 2:12).
Christ’s name, and therefore God’s name and God’s honor, is at stake whenever we fly to Jesus for refuge and bank on his worth instead of our own. This is why there is no contradiction in saying that God loves his name above all things, and yet is committed with all his heart to the good of his people—the people who hope in Jesus. He will not turn away from doing good to them. He rejoices in doing this good for them. And—for all who can believe it—he exalts over us with loud singing.”
-John Piper, The Pleasures of God: Meditations on God’s Delight in Being God, 182-183.