Assuming one is adequately prepared, why do mistakes still happen in performance? Some possibilities from my personal experience:
a) Distraction: Thinking about something non-musically related and performing on auto-pilot. Sometimes auto-pilot works just fine, but switching focus back to music is when things go wrong.
b) Evaluation: Thinking, “That could’ve been better,” or “This is going well!” Whether positive or negative, evaluation means I’m thinking about what already happened instead of listening and being in the moment. Not much different from a) in effect.
c) Self-doubt: Thinking, “Do I remember the fingering/notes here?” “Can I play this part?” Obviously the answer is “yes,” but the second I doubt it, I screw it up.
d) Forgetting: Some things require extra concentration or intentional counting to execute, and I don’t remember to do it unless it’s written in my score. (I’m sorry to report this worsens with age.)
e) Accidents: Sometimes mistakes just happen because we’re human.