One of the most important lessons I've learned from fiction is from the relentless joy in spite of, or maybe because of, repeated failure in some stories.
The most common source of this trope in my memory is in anime, but it's everywhere, in every culture and narrative medium I've experienced.
Failing is not a negative in itself. Sometimes the consequences are a negative. Usually though, there's a lesson to be learned that's a net positive.
Something something Edison.