I think it goes back to my high school days. In computer class the first assignment was to write a program to print the first 100 Fibonacci numbers. Instead I wrote a program that would steal passwords of students. My teacher gave me an A.
There is no better than adversity. Every defeat every heartbreak every loss contains its own seed its own lesson on how to improve your performance the next time.