For the perfection of benevolence it is also required that a person do good in all things: whence it is added: And as you wish that people would do to you, do also to them likewise. And note that he does not say: as they do, but: as you wish, because everyone wishes, when he is in need, to have good done to him and to be relieved in every necessity: Proverbs twenty-four: "Do not say: As he has done to me, so will I do to him, and I will render to each one according to his work." In this commandment is the fulfillment of the natural law, whose one negative part is set forth in Tobit four and is... implied here: "What you would hate to have done to you by another, see that you never do to another." He wills therefore that we always do good, when we can, to everyone, just as we are ready to wish to receive, according to that passage in Galatians, the last chapter: "Let us not grow weary in doing good," etc. And note that he does not say: do as people wish, but: as you wish; both because our own will is better known to us; and also because consideration of ourselves moves us more; and also because he speaks to those who have a rightly ordered will, and according to that will one must act. In summary, it must be held concerning the precept of beneficence in general that it binds only insofar as it is made explicit through the specific obligations of precepts; and therefore above the law of nature the written law was added, so that through it a person might know to what he was bound by justice.
Source: Commentary on Luke, Chapter 6