Why does Socrates think that right conduct cannot be defined as "telling the truth and restoring anything we have been trusted with"?
Plato, Republic, 331c.
The context is the initial discussion of Cephalus' conventional wisdom (see the refernces to Sophocles and Pindar).
Cephalus suggest a naive view of justice, defined as
"truthfulness, and returning anything that you may have received from someone else".
With its typical argumentative approach, Socrates suggests a case in which Cephalus’ definition of justice fails: a man has borrowed a weapon from a friend and the friend, after losing his mind, asks that the weapon be returned.
According to Cephalus' definition, the just action is to return the weapon, but this would clearly be the wrong decision.
The gist of the discussion is to set the stage for Socrates' search for the "philosophical" definition of justice: the essence of justice.