Experience builds ability as well as confidence; but it's also very true that mindset can change dramatically in that moment that you realized that you are not "training/playing" and that the danger is real. Some of us seem to be genetically programmed to keep fighting even while dying or being maimed; others go into shock when struck once; others surrender too easily.
It has also been my experience over the decades that many modern martial artists [not all by any means] assume that their deadly/"secret" techniques will guarantee survival "when the going gets rough". It might, it might not; as there are too many variables to anticipate for each such situation.
For example, not too long ago I misjudged my training partner's reaction to something he'd tried during some light sparring and flattened his nose accidentally; he stopped what we were doing to clean up his face and wipe away the tears. He said he couldn't continue as he couldn't see. So an observer with little fighting experience might be tempted to think that flattening someone's nose might be a good fight-ender [and it can be] but I know that partner well. If he'd been at real risk, he would have fought through the pain and the tears and the same observer might have thought "shit, that technique is useless."
Finally, from my days working for the police, one of my officer friends had been involved in a raid on a house where someone was shooting back. When the special tactics squad broke down the door, the culprit [who later died] was still firing at them even though he had already had been shot himself more than a dozen times by then. Life-and-death stress can do umpredictable things to the human body.
In the end, all the martial training in the world can't overcome the lack of will to fight. I once saw it well described by someone posting on a martial discussion board "You can arm and train sheep but, in the end, most will end up remaining sheep." A little harsh for those who choose some of the many other good reasons to do something like taijiquan or any Chinese martial system -- but, nonetheless true!
Copyright Michael Babin ©2017