Matt. VI. 1.
“Take heed that you do not your alms before men, to be seen of them.”
He roots out in what remains the most tyrannical passion of all, the rage and madness with respect to vainglory, which springs up in them that do right. For at first He had not at all discoursed about it; it being indeed superfluous, before He had persuaded them to do any of the things which they ought, to teach in which way they should practise and pursue them.
But after He had led them on to self-command, then He proceeds to purge away also the alloy which secretly subsists with it. For this disease is by no means of random birth; but when we have duly performed many of the commandments.
It behooved therefore first to implant virtue, and then to remove the passion which mars its fruit.
And see with what He begins, with fasting, and prayer, and almsgiving: for in these good deeds most especially it is wont to make its haunt. The Pharisee, for instance, was hereby puffed up, who says, “I fast twice a week, I give tithes of my substance.” And he was vainglorious too in his very prayer, making it for display. For since there was no one else present, he pointed himself out to the publican, saying, “I am not as the rest of men, nor even as this publican.”
And mark how Christ began, as though He were speaking of some wild beast, hard to catch, and crafty to deceive him who was not very watchful. Thus, “take heed,” says He, “as to your alms.” So Paul also speaks to the Philippians; “Beware of dogs.” And with reason, for the evil beast comes in upon us secretly, and without noise puffs all away, and unobservedly carries out all that is within.
Forasmuch then as He had made much discourse about almsgiving, and brought forward God, “Who makes His sun to rise on the evil and the good,” and by motives from all quarters had urged them on to this, and had persuaded them to exult in the abundance of their giving; He finishes by taking away also all things that encumber this fair olive tree. For which same cause He says, “Take heed that you do not your alms before men,” for that which was before mentioned, is “God's” almsgiving.
Source: Homilies on the Gospel of St. Matthew (New Advent)