P. T. Barnum was right? (The phrase "there's a sucker born every minute" is often attributed to him.) Otherwise I haven't a clue.
Best guess though is that they're cheap for law enforcement (government) to buy. Personally, I think that they're crap, couldn't give me one as I have no desire to suffer a self-inflicted gunshot wound. (When it comes to handguns I'll stick with SIGSauer and H&K for semi-auto and Dan Wesson for my "wheel" guns.)
Let's start with that modified hammerless single-action with no safety or de-cocking mechanism BS (sorry, gun is always cocked when one is in the chamber and a "mini-trigger in the main trigger is NOT a safety; it does NOT stop the trigger from being pulled). I remember a rash of law enforcement officers in the States shooting themselves in the legs while attempting to remove their weapons from their holsters when those things first showed up in law enforcement circles. I wouldn't even be surprised if that trigger mechanism has led to a number of unintentional police shootings.
I think your answer is more reasonable and objective than the answers Sandra received on Yahoo Answers and Quora. She and I think it is probably suckers who buy Glocks and praise them so highly. She told me that Glocks are advertised to the saturation point, as are Rolex watches, so naive people imagine that Glocks and Rolexes are much greater than they actually are. Many people mindlessly believe the media, so they have many absurd ideas. I posed for an artist-writer who wrote several books about watches and guns, among other things. I have read some of his books, and they are helpful in several ares of life. After reading his books on watches, I see Rolex is not special. I have not seen him write about Glocks yet. I hope he will soon.
I am used to Russian Makarovs and Tokarevs. I like to be ready to shoot in a split second if I need to do it. Cycling the slide takes too long for that. My American friend Sandra owns several fine handguns. She can draw and fire her Browning "Hi-Power" and CZ-75 quite quickly. They have thumb safeties. It sounds as though a Glock is much slower to draw and fire than these pistols.
Sandra says her CZ-75 is the most accurate combat 9mm Luger pistol she has fired. It is also good in quick draw she tells me. The negative traits it has are being more difficult to disassemble for cleaning than her Beretta and SIG and not functioning with every cartridge. She allowed me to fire it some, and I am impressed.
I only carry mine when I am deep in the wilderness. On one occasion, merely the sound of the slide was enough to frighten away a mountain lion. Wild animals approach without weapons and with caution. I don't need to be so quick. I like my Glock, it saved me from at least one possibly dangerous situation.
IMHO Glocks are poorly designed junk. And "the slide is the safety" . . . what a load of bull. That statement indicating that the weapons should never be carried with a round in the chamber due to safety considerations just highlights their uselessness. (Nothing like having a sidearm that's not ready to immediately deploy and instead having to work the action while trying to remain quiet and inconspicuous.) Even the ancient (designed over 100-years age) M1911 single-action .45 ACP can be safely carried "cocked and locked" because it actually has a safety (what a concept!).
But if you insist on a plastic gun you might check out Mattel's offerings.
I hear that some men including policemen have shot themselves in the legs with Glocks. I have never fired one, but I am learning more here than I did from answers to Sandra's same question on Yahoo Answer and Quora. Most people on those websites seem to be advertisers for Glock. Sandra listed several criteria for judging combat pistols, and some answers evaded that. Some trolls were insulting to her. I think we have established that Glocks fail by the criteria quick draw and safety to user. elimination of a thumb safety is a bad idea. I see no need for plastic pistols. Aluminum alloys are more than enough. Thank you for your insightful answer and comments, Salt and Red Pepper.