"For the sake of." Here the confidence conceived from divine mercy and justice is presented. And concerning this he does two things. First, he presents the confidence he has for himself. Second, he invites others to confess, at "Who is the man?" Concerning the first he does two things. First, he presents his confidence. Second, he assigns the reason for it. He says therefore that the Lord will give a law, etc., and this pertains to his goodness; and therefore he says, I trust that he himself will be propitious to my sin, that is, will forgive me my sin: Lk. 7: "Who is this, who even forgives s...ins?" And he will do this not because of our merits, because these deserve punishment, but "for the sake of your name." The name of God is taken here not only as it is spoken, but the reality signified by the name, which is divine goodness: as if to say, on account of his goodness he will forgive me my sin: Ps. 78: "Save us for the sake of your name," that is, so that your name may be glorified. And it especially befits the name of Jesus Christ, which is the name of salvation, as is said in Mt. 1. And why? "For the sake of your name"; because my sin is so great that by its merit it does not deserve forgiveness; hence he says, "for it is great," that is, grave and heavy, in the multitude and plurality of sins: Jas. 3: "In many things we all offend"; at least venially: Prov. 24: "The just man falls seven times a day and rises again." Or, "great" in gravity: Ps. 37: "My iniquities have gone over my head, and like a heavy burden have weighed upon me." Or this is said against the Novatians, who called themselves Cathari, that is, the pure. Novatus was a priest in the time of Decius; and he said that no one could return to repentance after Baptism once he had fallen. But if this were true, the Psalmist would say in vain in Ps. 26: "You will be propitious to my sin."
“For Thy Name’s sake, O Lord, Thou wilt be favourable to my sin; for it is manifold” (ver. 11). Thou hast not only forgiven my sins, which I committed before I believed; but also to my sin, which is manifold, since even in the way there is no lack of stumbling, Thou wilt be made favourable by the sacrifice of a troubled spirit.
Although the mercy of God mitigated the truth of his judgment, nevertheless, because David was bold enough to make such statements, he was abandoned to his weakness for awhile, and, as you say, to the freedom of his will.