The answer is: The justification of suffering
According to the justification of suffering principle, people are more likely to make a personalized explanation to justify the bad decisions that caused suffering in their life rather than acknowledging we make a mistake.
In Tom's case, rather than acknowledging his lack of discipline, Tom decided to justified his failure by telling himself that he got some sort of psychological benefit from the program.