The Foundations of the Mitzva
יסודות המצווה
It is a positive Torah commandment to lend money to a person who needs it, as it says (Shemot 22:24): "If you lend money to My people." Now, wherever the Torah says "if," the intention is that the matter is optional – if you wish, lend, and if you do not wish, do not lend. But here our Sages said in the Mekhilta that this is one of the three places where the Torah used the word "if" even though the intention is a mitzva that one is obligated to fulfill. In truth, the word "if" is not directed at the mitzva itself, but refers to the end of the verse: if you lend and the borrower has no money to repay, do not act toward him as a creditor (Ahavat Ḥesed 1, n. 2). The conclusion, then, is that just as there is a mitzva to put on tefillin and to recite the Shema, so too there is an obligatory mitzva to lend money to a person who needs it (SA Ḥoshen Mishpat 97:1).
The Sages said in tractate Shabbat (63a) that this mitzva is greater than the mitzva of tzedaka. Likewise, Rambam wrote in Sefer HaMitzvot (197) that God commanded us to lend to the poor person in order to ease his poverty and give him relief, and this is a stronger and more obligatory mitzva than any mitzva of tzedaka. For one whose poverty has already been revealed publicly and who stretches out his hand for tzedaka does not suffer the distress and shame of the hidden poor person, who wants to be helped before his poverty is revealed publicly and he is humiliated. Therefore, the mitzva of lending takes precedence over and is preferable to the mitzva of tzedaka, since it involves extra consideration for the suffering of the other.
The mitzva of lending has another advantage over the ordinary mitzva of tzedaka: the mitzva of lending applies to both the poor and the rich, whereas tzedaka is only for the poor (Sukka 49b). That is, the kindness expressed in the mitzva of lending is more general and comprehensive and touches all relationships between a person and his fellow, whereas tzedaka is an expression of kindness only toward a certain type of person. And although the verse says, "If you lend money to My people, to the poor among you," the intention is not that there is no mitzva to lend to a rich person; rather, the intention is that if a rich person and a poor person come to borrow, one should give precedence to the poor person over the rich one, because his need for the loan is greater (Bava Metzia 71a; SA Ḥoshen Mishpat 97:1).
Had the Torah not said that one should give precedence to the poor person, most people would prefer to lend to the rich, because there is more assurance that the rich will be able to repay the money, and even to return the favor in the future – unlike the poor person, who has no means of doing so. Therefore, the Torah needed to emphasize "to the poor among you," to give precedence to the poor over the rich (Ahavat Ḥesed 1:1).