He tells us why he is thankful when he adds, who comforts us in all our affliction. As if to say: He is blessed, because he comforts us in all our affliction: "God who comforts the downcast" (2 Cor. 7:6).
He gives the reason for this when he says, so that we may be able to comfort those who are in any affliction. Here it should be noted that there is an order among God's gifts. For God gives special gifts to some, that they may pour them out for the benefit of others; for he does not give light to the sun in order that the sun may shine for itself alone, but for the whole world. Hence, God de...sires that some profit accrue to others from all our gifts, whether they be riches or power of knowledge or wisdom: "As each has received a gift, employ it for one another" (1 Pet. 4:10). This then is what the Apostle says, who comforts us in all our affliction.
But why? Not only for our benefit, but that it profit others too. Hence, he says, so that we may be able to comfort those who are in any affliction. For we can comfort others by the example of our own comfort. For one who is not comforted does not know how to comfort others: "He who has not been tried, what manner of things does he know" (Sir. 34:9) about any affliction; "The Spirit of the Lord God is upon me to bring good tidings to the afflicted" (Is. 61:1); "He who comforts all who were mourning in Zion" (Sir. 48:27). We are able, I say, to comfort them by exhorting them to endure sufferings by promising eternal rewards, i.e., because we exhort you by the Scriptures and internal inspirations, in order that we may patiently endure and exhort others by our example and by the Scriptures themselves: "For I received from the Lord what I also delivered to you" (1 Cor. 11:23); "What I have heard from the LORD of hosts, the God of Israel, I announce to you" (Is. 21:10).
Source: Commentary on 2 Corinthians