1,174. Lending Money
178:5 Kohanim and Leviim are exempt from the mitzvah of a firstborn donkey, as are the daughters of kohanim and Leviim, but their husbands are obligated in this mitzvah. If an Israelite is partners in owning the donkey with a kohein, a Levi, or a non-Jew, this makes him exempt as well. However, it is forbidden to enter into a partnership with them, or to sell the mother to them, in order to remove the sanctity from the offspring. One already has alternatives in the form of redemption or breaking the donkey's neck.
179:1 We are commanded to lend money to a needy Jew as per Exodus 22:24, "if you lend money to any of My people who is needy among you..." Even though the Torah says "if," the Sages have a tradition that this "if" is not optional but mandatory. The Mechilta says, "'If you lend money to any of My people' - this is mandatory. You might think this is optional because it says "if," so the Torah tells us 'you shall surely lend to him' (Deuteronomy 15:8). We thereby see that this is mandatory, not optional."
Since lending money is mandatory, why does the Torah use the word "if" at all? This is to explain to whom we should lend. If you lend money, "lend to my people" rather than to idolators. To whom among My people? To those who "among you." From here we learn that needy relatives come before other needy people, and the needy of one's own city come before the needy of another city.
The mitzvah to lend money to a needy person is greater than giving charity to a needy person who asks for it. This is because the latter are already in a position where they need to ask, while the former have not yet reached this point. The Torah criticizes those who refuse to lend money to the needy as per Deuteronomy 15:9, "and your eye will be evil against your needy brother." However, regarding one who lends to the poor in their time of need, Isaiah 58:9 says, "you will call and Hashem will answer."