Bava Metzia 24 - Going Beyond the Letter of the Law

Rav Yehudah was following behind the master, Shmuel, in the market of cereal stores. He asked Shmuel, "If one found a purse here, what is the law?" Shmuel said, "It belongs to the finder." Many people pass by here, and one of them is likely to take it. Thus, the owner despairs. 
Rav Yehudah continued, "If a Jew comes and gives an identifying mark for it, what is the law?" Shmuel said, "He is obligated to return it." How can both rulings be true? The second statement reflects a moral obligation of going beyond the letter of the law.
Test your knowledge of the daf