Prime example of this happened to me this weekend, 2x though not with handguns.
Just doing some target shooting with my Marlin 39a. I rarely if ever shoot it, and I loaded the gun and pulled the trigger 2x, cycling the lever both times and looking in confusion at the live rounds that were ejecting out on the ground.... Then I realized I left the stupid crossbolt safety on.
Right afterwards, I shot my M&P 22-15 which I shoot all the time. I naturally flick the safety off every time I look down the sights.
Later that afternoon, while crow hunting with my brother. There was one swooping in low right out front in my "zone" and I pulled up getting a click instead of a bang. My brother saw it and was expecting it to be his bird, but I cycled out the "dud" round and had another in the chamber before the bird even started to turn and nailed it. (Benelli click, wasn't fully in battery for some reason
On a later stand, they were coming in hot and heavy. I emptied my gun but another one was coming in fast and my brother said that in the time he had to raise his gun and take the shot, I already had mine loaded +1 and ready to take the shot.
I only use Benelli shotguns so my hands go through the motions even though my mind may be occupied on watching that crow making his last dive.