He who stops his ear to the cry of the poor, etc. This sentence should be taken generally, and not only for the needy or physically infirm: for even he who, in the face of others' crimes, prefers to hold the judgment of a judge rather than to sympathize with the affection of mercy, shows himself not yet purified from the filth of vices, nor worthy to exist in the hearing of divine compassion. A hidden gift extinguishes anger, etc. He who desires to appease the anger of the strict judge, which he has earned by sinning, should give alms to the poor, and this without any delight in human favor, b...ut solely out of love for the Creator, who looks upon the hidden things of the heart. For thus the hidden gift is made, thus it benefits to mitigate the wrath of the Creator, if it is given without any expectation of external reward. Thus is fulfilled what he himself commanded: "But when you give alms, do not let your left hand know what your right hand is doing" (Matthew 6:3).
Source: Commentary on Proverbs