Bava Metzia, Chapter 3, Mishnah 6. This Mishnah comes to answer the question: What is the law regarding a watchman who noticed that the grain entrusted to him for safekeeping in his warehouse has begun to rot - growing mold, being lost to the wind, or being eaten by mice? Must he intervene and sell the grain to salvage its value in cash, so that it does not lose any more of its value, or should he leave it as it is? The Tanaim debate this question, as we will see immediately.
Before we delve into the dispute, we must preface that there is a certain rate of expected loss - between two and a half and ten percent a year, which is eaten by mice and the like. The details of this will be explained in the upcoming Mishnayos. Our Mishnah assumes that we are dealing with a standard loss, those few percentages a year that are lost. What, then, is incumbent upon the watchman to do?
The language of the Mishnah:
"Hamafkid peiros eitzel chaveiro, afilu hein avudin - lo yiga bahen" - One who deposits his produce, such as grain, with his friend, and even if the watchman noticed the beginning of rot or a loss caused by mice, he may not touch the produce that was entrusted to him. Even though it is true that their value is decreasing, we have an established rule that a person prefers his own produce that he toiled over rather than receiving money to purchase produce from someone else.
It is worth noting the famous expression used by the Sages: "Rotzeh adam bekav shelo yoser mitesha kabin shel chaveiro" - a person prefers one kav of his own over nine kavin of his friend's. While this is an exaggeration, since a person would not agree to lose ninety percent of the value of his assets, nevertheless, as a rule, a person prefers a little of his own over a lot of someone else's.
The opinion of Rabban Shimon ben Gamliel:
Rabban Shimon ben Gamliel disagrees and says: "Mocharan bifnei beis din" - he sells them in the presence of a beis din. In his opinion, once the watchman realizes that a significant percentage of the deposit entrusted to him is being ruined and lost, the right thing to do is to sell it to a third party, and in the presence of a beis din, to ensure a fair price. The watchman is not permitted to purchase it for himself; the sale must be made to a third party, in an objective transaction and at a fair price, and all the proceeds will go to the depositor - because this is preferable to losing further value.
And his reasoning: "Mipnei shehu kemashiv aveidah labe'alim" - because he is like one returning a lost item to the owners. The Torah commandment of returning a lost item obligates one to return a person's lost object, and this includes the obligation to prevent his friend's property from going to waste. Therefore, one who is entrusted with guarding grain that is being lost to mice - the proper thing is to sell it and salvage whatever value is possible.
It is worth noting that even the Sages concede that if the rate of rot, depreciation, or loss is greater than expected, the watchman must first turn to the depositor and inform him: The mice are eating your grain at a faster rate than anticipated, and ten percent of it has already been lost - how should I act? However, if the depositor is unavailable and is not in the city (and at the time of the Mishnah, of course, there were no telephones), even the Sages concede that the proper thing to do is to sell the deposit and salvage any value that can be saved.
In summary: In practical halachah, a person does not touch items that he was entrusted to guard, even if they are losing their value, due to the principle of "a person prefers one kav of his own over nine kavin of his friend's." However, if the rate of spoilage is higher than what the depositor would have expected, he must indeed sell them to a third party, in an independent transaction and in the presence of a beis din, in order to salvage any value that can be saved.