For several thousand ought years humans have struggled with Truth. For the last 200 years or so, science has emerged as the only dependable mechanism to establishing many truths. Sure, there are those who say science does not tell us why we find a given piece of art beautiful or moving, why we like a certain genera of fiction, why we love this person but not that person. These truth claims are currently beyond the purview of science. (Notice: I said "science does not" not "science can not", because we are always learning more about how we think and make decisions.) Regardless, even if science does not answer these questions, what does? Surely not the bible or koran or other holy book. Are we really comfortable with revelatory truths? If so, I have a way that you too can feel better for only $19.99 a month.
As scientists, we strive to learn truths about the universe. Admittedly, almost all of us are learning small truths about the universe. However, these small truths provide the foundational truths that allow those truly rare individuals to gain fundamental insights into our understanding of the universe. We strive to be skeptical and rational in our lives. But we fail in this endeavor or even ignore it. I do not worry about why I like a certain piece of art, but not another because it does not matter. However, sometimes we fail in ways that do matter. We might decide to become evangelical christians because water freezes in the winter , we might think vitamin C is a magic bullet. At the end of the day scientists are people just like everyone else.
Sometimes though people make mistakes, we screw up. What's worse is that we realize it, either directly because we figure it out or indirectly because someone points it out to us. The question now is what do we do with this information. As a scientist, I have been trained (albeit informally) that if I screw up I need to deal with it. Actually, I learned this as a child but the mechanisms for dealing with it and the reason why it is important to deal with it became clearly apparent during as I trained to be a scientist.
Let's say I publish a paper with solid data, but later on learn that the data was not so solid. In fact, maybe someone else in my lab cannot replicate the data, we bust our humps trying to figure what's wrong, but it turns out the original data set was flawed in some way that was not previously known. Now I write to the journal and retract the manuscript (this is not a case a fraud but a case of things not being perfect and science being self-correcting). Other scientists may simply keep their paper in a high impact journal and send out a letter to the community saying the study was flawed (this is considered the wrong way to do it, but some people pull shit like this).
Or let's say, I may have strong evidence that a student cheated on an examination. I will almost certainly fail the student based on this evidence. I may even make it known to the class that I failed a student for cheating. But what if additional new information came to light absolving the student of cheating, what to do? Probably the best course would be to apologize to the student, correct the grade, and if necessary point out to the class that no misdeeds were done because you made a mistake. I fucked up, it happens. I think that's what I would do, because I care about my reputation and being right when its known you are actually wrong does nothing to help your reputation. Of course it sucks to be wrong as experimenters, teachers, parents, etc. but hopefully we have enough self esteem to deal with it when we are wrong. Regardless, admitting when we are wrong and dealing with it advances our quest for truth and provides evidence to others that we mean it when we say that we strive for truth.