אִם־בְּעָלָ֥יו עִמּ֖וֹ לֹ֣א יְשַׁלֵּ֑ם אִם־שָׂכִ֣יר ה֔וּא בָּ֖א בִּשְׂכָרֽוֹ׃ (ס)
Kung ang may-ari nito ay kasama niya, hindi siya magbabayad; kung ito'y inupahan, napunta ito sa kanya dahil sa upa.
Mishneh Torah, Hiring
One who deposits [property] with his fellow - whether for free, or the owner paid the bailee, or the owner lent it to him, or he rented it out to him - if the bailee also took the owner for free along with his property - or hired [the owner for money] - the bailee is completely exempt from all [loss to the property]. As it is said: "If [the property's] owner is with it, he need not pay; if [the property's owner] is a hired worker, [the risk of damage to his property] is included in his wage" (Exodus 22:14). In what circumstances does this apply? When the owners volunteered or were hired at the same time as [the bailee] took the object, even if the owner was not with the object at the time of the theft or the loss or when the [object was lost through] force majeure. But if [the bailee] took the object - and first became a bailee - and only afterwards hired the owners or had them volunteer - even if the owner is standing there at the time when the deposited object is harmed - the [bailee] must pay. As it is written "If its owner is not with it - [the bailee] must pay." (Exodus 22:13). They learned from tradition: If [the owner] was with it at the time of borrowing, even though he was not there at the time of the theft or the death - [the bailee] is exempt. If [the owner] was not with it at the time of borrowing, even though he was with it at the time of death or capture - [the bailee] is liable. And this is the case for the other [types of] bailees. If any of [the objects] come with their owners - [the bailees] are exempt. Even if [the bailee] is negligent - if the object came with its owner, [the bailee] is exempt.
Mishneh Torah, Positive Mitzvot
To adjudicate cases of loss for which a gratuitous borrower is liable, as it is said, “And if a man borrow aught from his neighbour….” (Ex. 22:13-14).