That sounds more like a neurological question. There are many, many errors that can be blamed on known deficiencies in cognition. Consider the numerous visual/neural errors of inattention and “fill” (sorry, don’t know the right term for the latter, but I’ll explain).
Inattention: You may be familiar with the inattention experiment where concentration on one thing causes you to miss something else that is important, but that would be obvious if you weren’t trying to narrowly focus attention. See the videos below.
Filling the gaps: Then there is our tendency to fill-in details that should be there but aren’t. Such as inserting the word “the” in the following sentence because we know it should be there: “The rain in Spain falls mainly on plain.U you may not be fooled by my example, but imagine that you are in a hurry or otherwise distracted and you can see how easy it would be to fall prey to such a mistake when writing or editing. The problem extends to other activities as well.
I have certainly left a few faucets running or doors unlocked when I was certain that I’d turned off or locked them. It is more likely to happen with daily routines, but can occur at any time. The mental image of the task completed created an impression strong enough to fool me into thinking I performed the task, rather than just thinking about it. I saw what I wanted to see and recalled what I expected, rather than seeing and remembering actual conditions. This is one of the reasons why people give such unreliable testimony as witnesses in court.