This quote spurs two thoughts:
The importance of examining failures
The importance of mindset - we get to choose our mindset. We can ask why from a "woe is me", "the sky is falling" frame of reference or we can ask why from a "how could this have been done differently", "is there something I can control in this circumstance and improve for the next time", or "what lesson can I take with me from this experience" mindset.
The perspectives are drastically different, and so are the results.