But the reason I write this to you is that you so adjust yourselves, that when I come, I will not be sad at seeing you uncorrected, in addition to the sadness I experienced when I heard that you had sinned. In regard to this he does two things: first, he gives his admonition; secondly, he shows that he is confident it will be obeyed (v. 3b). The admonition is this: I wrote as I did, namely, that I am pained at the sin you committed: "he was vexed in his righteous soul day after day with their lawless deeds" (2 Pet. 2:8), in order that you might prepare and arrange yourselves by correction, so ...that when I came I might not suffer pain at your sins from those who should have made me rejoice, i.e., I ought to rejoice and be glad in your presence: "There is joy before the angels of God over one sinner who repents" (Lk. 15:10). The confidence he had that they would follow his admonition is indicated when he says, for I felt sure of all of you. As if to say: I have this confidence in you, that you will be so disposed, that when I come, all of you will give me reason for joy; and you should do this cheerfully, that my joy would be the joy of you all, i.e., it would contribute to your joy, or it is for the sake of your joy, which you have from the recovery of grace: "Rejoice with those who rejoice" (Rom. 12:15).
Source: Commentary on 2 Corinthians