Soncino English Talmud
Ketubot
Daf 108a
the latter may nevertheless pay for him his shekel, repay his debt and restore to him any object he may have lost; but where a reward is taken, the benefit is to be given to the sacred funds. Now, one can well be satisfied [with the ruling that] he may 'pay for him his shekel' [because by this payment] he merely performs a religious act, for it was taught: It is lawful to withdraw [from the funds of the Temple treasury] on the account of that which was lost, collected or about to be collected; and [the ruling that he may] restore to him any object he may have lost' [is also intelligible since thereby] also he is performing a religious duty; but [how could he be permitted to] 'repay his debt' [when thereby] he undoubtedly benefits him? — R. Oshaia replied: 'This ruling is that of Hanan who said: HE LOSES HIS MONEY. Raba, however, replied: The ruling may be said [to agree even with the view of] the Rabbis, for here we are dealing [with the case of a man] who borrowed money on the condition that he does not repay it [except when he is inclined to do so]. It is well that Raba does not give the same reply as R. Oshaia, since [he wishes] the ruling to agree even with the opinion of the Rabbis. On what ground, however, does not R. Oshaia [wish to] give the same reply as Raba? — R. Oshaia can answer you: Granted that he has no actual benefit;
Sefaria
Mesoret HaShas