It is quite a noble thing to do; he gave back what he stole to clear his mind and do the best thing he could possibly have done. Logically, if he hadn't done that, he would have never had to return the money and live in misery for sixty years. But he did, and unlike many others, corrected his deeds.