My take on this?
First, there is a significant bias in the US in favor of things .45 ACP. That must be remembered because it sets the stage so to speak for everything else. How many times have you heard, 'I don't care what calibre it is as long as it begins with a four.'?
It is appropriate to mention here that SAAMI spec 9mm ammo is generally weaker than European 9mm ammo.
Second, the FBI Miami shootout and its subsequent 'stopping power' ammo testing also created an undeserved negative perception - at least within the law enforcement community, towards 9mm. (I won't bother going into the motives behind the exercise.) Remember too that the FBI originally purchased S&W 10mms, but the guns didn't hold up to the use and abuse, nor were they 'shooter friendly' or a good grip fit for most females and smaller statured males.
The .40 S&W was basically created to put a 10mm bullet into a 9mm length case which made the guns more 'gripable' while up-grading (marginally) the ballistics.
Coincidentally, the introduction of the .40 was shortly followed by the Brady Bill that limited magazines for civilian use to 10 rounds. The 10 rd capacity limit negatively affected sales of 9mm guns which offered an advantage of more rounds in the same size 'package' (grip).
Now for reality and logic, which in the end always seems to surface.
The 9mm performs. It has for decades. Otherwise, it would no longer be in use by countries that have put it to the test of armed conflict. Canada comes to mind. Canada has used 9mm Inglis pistols in WWII, Korea, numerous peacekeeping missions around the globe, and now in Afghanistan. They are rumoured to be considering changing platforms (& have done in the past), but not calibre. One might point out that Canada went to the 9mm Inglis because the .38-200 Enfield revolvers they were using in early WWII weren't up to the task.
Now for the law enforcement community. Yes, many agencies did drop the 9mm for .40s, .357 SIGs, and even the .45. Most of those agencies will keep them, no worries. However, there are as many if not more that stayed with 9mm for any of a number of reasons. They found that their guns with good ammo do just as good as the 'big boy' calibres with equally good ammo.
With the passage of time, more 'information from the field' is available, and people are noticing. With that too, the manufacturers are benefiting from a better understanding of how a bullet performs, why does and why it doesn't, and are cranking out better bullets.