"And if it is indeed stolen" (Exodus 22:11). I know only of theft; from where do I learn loss? You may reason: since theft is a failure of safekeeping and loss is a failure of safekeeping, if you have learned regarding theft that he must pay for it, so too for loss he must pay. "From him": anything that is with him. If one said, "Lend me your cow," and the owner sent it by the hand of his son, his servant, or his agent, and it was stolen on the way, one might think the borrower is liable; Scripture says "from him," meaning from the domain of the guardian. "He shall pay to its owner," whether man or woman, whether minor or adult. Another interpretation: "he shall pay to its owner." If not, what could enter my mind, that he pays to someone who is not the owner? If you say it is a correction of the text, it has already been said "the best of his field and the best of his vineyard he shall pay" (Exodus 22:4). Yet it is not the owner there. So what does "he shall pay to its owner" teach? To its owner and not to a creditor; to its owner and not to one harmed and not to the holder of a deposit. From here you say: if a man held a deposit or a loan in the hands of others, to whom should they be given? Rabbi Tarfon says: they should be given to the weaker of the claimants. Rabbi Akiva says: they should be given to the heirs, for the heirs are exempt from swearing.
The Paid Bailee Who Pays for Theft and for Loss Alike
Mekhilta DeRabbi Shimon Ben Yochai 22:11
ואם גנב יגנב אין לי אלא גנבה אבדה מניין הרי אתה דן הואיל וגניבה חסרון שמירה ואבידה חסרון שמירה אם למדת על הגניבה שחייב לשלם עליה אף אבדה חייב לשלם עליה: מעמו. כל שהוא עמו אמר לו השאיליני פרתך ושלחה לו ביד בנו ביד עבדו או ביד שלוחו וגנבה בדרך יכול יהא חייב ת"ל מעמו מרשותו של שומר: ישלם לבעליו. בין איש בין אשה בין קטן בין גדול: ד"א ישלם לבעליו אם לאו מה עלתה על לבי שלא לבעליו הוא משלם אם תאמר תקון מקרא הוא הרי כבר נאמר (פס' ד') מיטב שדהו ומיטב כרמו ישלם אין כן בעלים מה ת"ל ישלם לבעליו לבעליו ולא לבעל חוב לבעליו ולא לבעל הנזק ולא לבעל הפקדון מכאן אתה אומר היו לו פקדון או מלוה ביד אחרים למי יתנו ר' טרפון אומר ינתנו לכושל שבהן ור' עקיבה אומר ינתנו ליורשין שהיורשין פטורין מלשבע: