The reason for loving is indicated in the word "neighbor," because the reason why we ought to love others out of charity is because they are nigh to us, both as to the natural image of God, and as to the capacity for glory. Nor does it matter whether we say "neighbor," or "brother" according to 1 Jn. 4:21, or "friend," according to Lev. 19:18, because all these words express the same affinity (ST II-II Q44 A7).The nearness which St. Thomas specifies isn't merely geographical, but rather it is ontological: That is, I ought to love my neighbor because he is like me: made in the image of God, and created for the same end. So primarily the reason is grounded in the Lord: I must love Joe because of God. This is why this second command is said to be "like" the first.
But it seems to me that there may be two other sorts of nearness which must be considered, too. First, we have a greater responsibility for charity toward family than toward others; second; we have a greater responsibility for charity toward those who really are geographically nearer. As to the first:
But if any man have not care of his own and especially of those of his house, he hath denied the faith and is worse than an infidel (1Tim. 5:8).As to the second: consider that if a man on the other side of the world needs urgent, immediate help, I am unable to provide it: I am too distant. My obligation of charity towards him is consequently reduced significantly (if not removed by this inability). On the other hand, my obligation of charity towards those in my town, or on my street, or in my block, or to my next-door neighbors, is clearly more immediate precisely because of their nearness.
Moving on to the mode of the command to charity:
The mode of love is indicated in the words "as thyself." This does not mean that a man must love his neighbor equally as himself, but in like manner as himself, and this in three ways. First, as regards the end, namely, that he should love his neighbor for God's sake, even as he loves himself for God's sake, so that his love for his neighbor is a "holy" love. Secondly, as regards the rule of love, namely, that a man should not give way to his neighbor in evil, but only in good things, even as he ought to gratify his will in good things alone, so that his love for his neighbor may be a "righteous" love. Thirdly, as regards the reason for loving, namely, that a man should love his neighbor, not for his own profit, or pleasure, but in the sense of wishing his neighbor well, even as he wishes himself well, so that his love for his neighbor may be a "true" love: since when a man loves his neighbor for his own profit or pleasure, he does not love his neighbor truly, but loves himself (ST, loc. cit).This is all worthwhile, but I want to particularly point out the third way - "in the sense of wishing his neighbor well." It's easy in a sensual age to misunderstand what love is. It's not a special way of feeling. It's seeking what is good for the other person. We don't really "love" another if we only do so for the sake of what he hope to get from him. This is really nothing but love of self.