When I was first in the Army, the standard sidearm was the 1911A1. They all were old and the magazines seemed too easily damaged.
When the Army announced they would go to the Beretta, I bought one to get more familiar. Eventually, I was issued an M9 and, personally, I thought it was a fine weapon. The environment I used the M9 in was not especially harsh. Additionally, I never really considered it a primary weapon. I was issued my M60 machine gun and the two weapons are on opposite ends of the spectrum.
Others in the Army has problems with the slide mounted decocking lever, Some would engage it while racking the slide and not notice until they need to shoot. Some complained that the 9mm FMJ did not work well in combat.
Overall, I have found that many who were issued pistols in the Army were not especially skilled and handling a handgun. In the case of the 1911A1, some would accidentally activate the safety with their thumb on recoil. Many had a lousy grip and trigger pull and blamed the 1911A1 as being unreliable and inaccurate. Part of this is also due to the training that was common years ago. Everything was done on the cheap and people were hurried through. Many received no real training and faced using the 1911A1 almost completely clueless.
I have seen the same lack of understanding with the M9. Many did not adapt to the first shot being double action and the next ones being single action. Many did not get a good grip and some soldiers had small hands. Many did not know the fundamentals in firing a handgun. Gloves complicated weapon manipulation for some.
I think looking at the military application of handguns can mislead civilians in their choices. Often, the handgun is seen as the alternative of having nothing and overall, the handgun has no major significance in military combat. There may be incidents where the handgun was key, but we remember those occurrences since they are so rare. American police officers more often use handguns as their primary weapon, however their tactics and training does not fully apply to the civilian situation.
Civilians operate is a different environment and usually, the weapons used need to be concealed. Most civilians are not pushed to clean and maintain their weapons as those in uniform are. They do not work in teams and have backup. Civilians are not ever expected to initiate the attack. They cannot call in airstrikes or artillery, nor do they have intelligence assets. Basically, when a civilian is in combat, their first defensive weapon is also their last resort. This is another good reason to strongly consider the tactics of avoidance or escape and evasion.