Our Gemara on Amud Aleph notes a textual anomaly in the verse that describes the Mitzvah for the creditor to return the collateral to the borrower when he needs to use it for basic living. The verse states (Devarim 24:14):

הָשֵׁב֩ תָּשִׁ֨יב ל֤וֹ אֶֽת־הַעֲבוֹט֙ כְּב֣וֹא הַשֶּׁ֔מֶשׁ וְשָׁכַ֥ב בְּשַׂלְמָת֖וֹ וּבֵֽרְכֶ֑ךָּ וּלְךָ֙ תִּהְיֶ֣ה צְדָקָ֔ה לִפְנֵ֖י ה׳ אלקיך

you must return the pledge at sundown, that its owner may sleep in the cloth and bless you; and it will be tzedaka to you before your God.

Usually, the term Tzedaka connotes charity. How is it charity to return an object to its rightful owner? Of course, the simple reading is that it is a charitable, generous act to allow him to use the collateral if he needs it for basic living, such as a blanket or a millstone. However, the Midrash halakha suggests a connotation of actual ownership, which has legal implications in terms of liability for theft, damage, and loss.

Rava explains that collateral is different because the creditor acquires it for himself. Rabbi Yitzhak infers from the verse that if the creditor does not acquire the collateral, then there is no righteousness involved in returning it. Therefore, when the collateral is returned to the debtor, it is considered an act of charity.

While discussing the usage and meaning of the word tzedaka, there is a beautiful and precise ethical analysis in the Guide for the Perplexed (III:53) where he explains the difference between three common and related Jewish words: ḥesed ("loving-kindness"), mishpat ("judgment"), and ẓedakah ("righteousness").

According to the Guide for the Perplexed, the term ḥesed denotes an excess in some moral quality, especially extraordinary kindness. It is practiced by showing kindness to those who have no claim upon us or by showing greater kindness to those to whom it is due. In the Torah the term ḥesed mostly expresses the kindness bestowed upon us by God. The act of creation itself is considered an act of God's loving-kindness. Ḥesed is used to express the good bestowed upon us by God. On the other hand, ẓedakah is derived from ẓedek ("righteousness") and denotes the act of giving everyone their due and showing kindness to every being according to what it deserves. When we fulfill our moral obligations towards others, we perform an act of ẓedakah. Mishpat, "judgment," refers to the act of deciding upon a certain action in accordance with justice, which may demand either mercy or punishment.

Thus, the Rambam uses these three terms to encompass the ways in which humans relate to the needs and obligations of Man to Man, society to Man, and Man to Society. There is a continuum of acts where, on one end, it is complete generosity with no pre-existing entitlement, which is chessed. Then there is the act of being decent and showing appropriate compassion toward others. This can be described as doing charity, even for ourselves, because we are abiding by the moral dictates of our conscience and elevating our personality and soul. This is another way of understanding the words in the verse "and it shall be FOR YOU a Tzedaka (charitable act)." And finally, there are societal actions that can represent kindness or punishment, but they fall under the realm of rational, legal action, and are therefore considered judgment, mishpat.

In summary, the act of returning the collateral to the borrower is considered an act of tzedaka, not in the traditional sense of charity, but in the sense of fulfilling one's moral obligation and doing what is right and just. It is an act of kindness that upholds the principles of righteousness and fairness, demonstrating the interconnectedness of giving and receiving. By giving to others what is appropriate, we ultimately receive blessings and righteousness before God.