But that is just one example of the force and power of Musar to correct human troubles.
The idea really come from the Gemara in Shabat. אין יסורים בלי עוון. There are no trouble without sin. Thus working on one's own faulty character traits --even when not successful, still shows an effort to be going in the direction of תיקון המידות correction of one's own bad character traits.