Failure is a better teacher than success as early success can easily get into the head and cause arrogance, whereas failure leads one to become humble, compassionate, and understanding.
William Shakespeare, the celebrated English playwright, quotes:
"Sweet are the uses of adversity,
Which, like the toad, ugly and venomous,
Wears yet a precious jewel in his head"
(“As you like it" Act 2, Sn 1 12-14)
Adversity in this context means failure, and this quote elucidates why failure very often becomes a good teacher. Troubles and failures make people appreciate what they have, remain content, and stay motivated, whereas unbridled success may make people lose sight and appreciation for what one has, vainly trying to over-achieve.
The feeling of “the grass is always greener on the other side" persists as a natural human tendency even during success. Failure and self-introspection allow one to realize innate talents and the positives one enjoys and then work toward leveraging such talents or favorable conditions.