Consider --
The person who put the note under Toby's collar, and the person who made the decision to abandon him, may not have been the same individual.
Or the decision may have been made under terrible duress.
Whatever you think of the latter decision, someone loved Toby before you did, and helped make him the dog who you later enjoyed.
It's possible that Toby's early life is only a story of misplaced canine trust and subsequent betrayal. But I suspect it was more complicated than that, and had more sadness to spread around than the part you know.