The scientific method is a process for solving problems. The typical scientific method is a 7-step iterative process consisting of: 1. Making an Observation, 2. Asking a Question, 3. Doing Background Research, 4. Forming a Hypothesis, 5. Conducting an Experiment, 6. Analyzing Results and Drawing a Conclusion and 7. Reporting/Sharing Results. If the results are different than the hypothesis, a new hypothesis is created and the iterative process begins again. Does the scientific method have shortcomings, sure, particularly when variables interacting create a new variable for which the control cannot be tested. Even so, beyond being a process, the scientific method ultimately shows that there is no such thing as failure, rather, failure is simply a feedback mechanism and can be likened in many ways to bumper bowling.
When viewed this way, failure is merely part of a process that refines and leads to greater understanding. The same is also true for success. Taken a step further, success and failure do not exist, rather, they are merely feedback mechanisms within an iterative process. Why is important to view success and failure as not existing and rather objectively as part of an iterative process?
Both success and failure have physiological and psychological impacts. Success can cause a lack of reflection, refinement, and improvement. Internalizing failure can cause depression, low self-esteem, and the inability to trust your own judgement. An objective approach that views success and failure as merely feedback can mitigate, to a degree, the emotional, psychological, and physiological aspects that success and failure bring. Additionally, it fosters the notion of process over outcome because ultimately the correct process, systems, and principles win out in the long run despite aberrations.
The goal is not to eliminate emotions, but rather to limit the negative aspects that success and failure can have cognitively, pyschologically, and physiologically so continued improvement, refinement, and understanding can occur.
There is a caveat as stupidity does exist. For example, if you put gasoline in your house, lit a match, and watched your house burn down for no apparent reason, or eat Tide Pods, that is stupidity.