Failure is not good for its own sake
Every learning benefit above comes with a condition: the mistake is followed by finding out what went wrong. Failing and never looking at it again teaches very little. The permission is to try and get it wrong, not to stop paying attention.
Metcalfe (2017), Learning from Errors. Annual Review of Psychology 68, 465–489“Corrective feedback, including analysis of the reasoning leading up to the mistake, is crucial.”