Learning from failure is not intuitively rational, but only because of the context we assign to the event of 'failing.' Like many problems of context and definition, it is one of time perspective.
This isn't too profound of a concept; essentially the reason time perspective applies is simply because if you're conceptually judging an decision as a 'failure' or 'success,' the only thing that matters is whether you're looking at the the immediate consequences of the decision or the distant consequences.
On a long enough timeline, every decision is a success, in the "you learn something from everything" sense. On a short enough timeline, every decision is a failure, in the "you haven't accomplished your goals yet" sense.
Obviously there's a balance to be struck here. The best part: where that balance is found is entirely within your perceptual control. (somewhat related: "If you have control over conditions, you have control over decisions)

