We worship God by external sacrifices and gifts, not for His own profit, but for that of ourselves and our neighbor. For He needs not our sacrifices, but wishes them to be offered to Him, in order to arouse our devotion and to profit our neighbor. Hence mercy, whereby we supply others' defects is a sacrifice more acceptable to Him, as conducing more directly to our neighbor's well-being, according to Hebrews 13:16: "Do not forget to do good and to impart, for by such sacrifices God's favor is obtained."
St. Thomas Aquinas, Summa Theologiae 2-2.30.4 ad 1