Reference for Bava Metzia 3:6
הַמַּפְקִיד פֵּרוֹת אֵצֶל חֲבֵרוֹ, אֲפִלּוּ הֵן אֲבוּדִין לֹא יִגַּע בָּהֶן. רַבָּן שִׁמְעוֹן בֶּן גַּמְלִיאֵל אוֹמֵר, מוֹכְרָן בִּפְנֵי בֵית דִּין, מִפְּנֵי שֶׁהוּא כְמֵשִׁיב אֲבֵדָה לַבְּעָלִים:
If one deposits fruits with his neighbor, even if they undergo loss [because of mice or decay], he may not touch them [to sell them. For "a man prefers one measure of his own to nine measures of his neighbor." His measure is beloved by him because he worked for it, more (beloved) than nine measures of others that he would receive for selling it. The rabbis say: "He may not touch them," only if they undergo the normal loss indicated in our Mishnah (below): for wheat and rice, nine half-kavin to a kor, etc. But if they undergo more than the normal loss, the sages concede to R. Shimon b. Gamliel that he sells them through beth-din. The halachah is in accordance with the sages.] R. Gamliel says: He sells them before beth-din, for he is like one returning a lost object to its owner.