The first money that he earned for selling the dog was not earned because he sold a dog that did not belonged to him. When he retrieved the dog and gave it back to the rightful owner, this time the money he received was rightfully earned because he corrected an error and had cleared his conscience in doing so.