The memory of a mistake, so long as one cares to access it, functions as a positive constraint, or a safety restraint that prevents one from falling, or at least prevents one from falling in the exact same way one fell before.
A micromoment in learning, and ideally the eventual mastery of a given path.