As many of us know the Browning designed pistols were very popular for military applications and even European police adoption, but US police forces used revolvers for much of the period after the WW2 until the 1970s or 1980s (I'm not sure). Why is this? Seems that semi-automatic handguns took over the majority of military use once WW2 ended.
If you don't know much about guns it can be easy to think that they are all kinda similar, especially in the modern context. However the reality is that modern pistols are very different from older pistols and that has many implications in regards to their adoption or lack thereof by either police or military forces. And the requirements for the police are very different from the requirements for the military, especially historically.
Firstly it's worth noting that historically the police have not been expected to use their firearms in the line of duty on a regular basis, that's a more modern phenomenon in the US. That means that for the most part officers were not overly concerned about how much "firepower" they were carrying, their revolvers were instead defensive weapons for extreme cases (the preponderance of shootouts in popular media to the contrary). Additionally, whereas on an active battlefield it may be necessary for a soldier to fire many shots, reload quickly, and have his spare ammunition in a convenient magazine, the same was not true for police officers in their line of duty throughout most of the 20th century. If they needed more firepower they could call in backup (including SWAT teams), retreat to their vehicle and make use of their shotguns, etc.
The Colt 1911 has many features that make it desirable on a battlefield. It fires a large caliber bullet (.45") so it has a considerable amount of penetrating and "stopping" power. It is semi-automatic so it can fire an entire magazine of rounds with single action (light) trigger weight, making it easier to fire controlled, well aimed shots. It uses magazines so it is quick to reload and be able to maintain cover or to keep up suppressing or defensive fire. It shares the same round with the Thompson sub-machine gun which was issued to US soldiers starting in 1938, which is a significant logistical simplification. Other militaries issued semi-automatic pistols for much the same reasons. The Luger used a 9mm round which was also used by the German submachine guns such as the MP40 et al. The Soviets used the 7.62 Tokarev round for both the PPSH-41/43 and their TT-30 service pistol. Of necessity a submachine gun needs to use a cartridge designed for automatic/semi-automatic fire, if a service pistol is chosen that shares the same cartridge then it too will be a semi-automatic design.
(Edit: I should clarify here that semi-auto pistols were adopted original by armed forces on their own merits, it was the logistical synergy with submachine guns that were adopted years later which helped to cement those pistols as standard issue sidearms for decades.)
However, the Colt 1911 also has some features that make it undesirable, particularly for police officers. While .45 ACP is a powerful round it also has a lot of recoil, which can make firing accurately more difficult. The 1911 is a single action only design with a manual safety, the only way to fire the gun is to cycle a round into the chamber and then pull the trigger after the hammer is cocked and the safety has been released. This added some complexity to firing the gun depending on how it was carried. If one carried a 1911 with an empty chamber (the safest way to do so) then it was necessary to cycle the action (which would also cock the hammer) before shooting, something that requires two hands and is potentially easy to forget in the heat of a fight. It could also be carried with the chamber loaded. If the gun was normally carried uncocked then it would be necessary to cock the gun (with the thumb) prior to shooting. If the gun was carried with the safety off ("locked") then it would be necessary to release the safety before firing. If the gun was carried both uncocked and with the safety on then both would have to be actuated before use. For police officers who were not expected to continually train in shooting (unlike today) all of these extra complexities led to more points of failure in highly stressful situations. The 1911 is also a large and heavy pistol, especially when fully loaded and with an extra magazine, which is undesirable if you need to carry a gun 8 hours a day, 5 days a week, for decades. Additionally, pistols have failure modes that revolvers don't. If a round is a dud then it needs to be manually cycled through the action, depending on ammunition and how a pistol is held when firing the round might fail to cycle properly resulting in a need to clear the action manually and cycle the next round. These failure modes reduce confidence in the gun and also add a burden of extra training (to understand and be familiar with them and to know how to recover from them).
In contrast to all this, 20th century revolvers were much more "user friendly". The standard round was the .38 special which was less powerful than a .45 but had much lower recoil and was easier for most people to shoot accurately without extensive special training. The standard revolver of the time was a double action design, the gun could be carried around with the hammer down and yet the only thing necessary to fire the first and subsequent rounds would be to unholster the gun and pull the trigger. The added safety margin of having the first firing require a full double action pull (which is a larger force than the single action pull) meant that extra safeties weren't really necessary, as it was difficult for the gun to be unintentionally discharged. The extra trigger pull force would reduce shooting accuracy but the police officer always had the option to manually cock the revolver so that the next shot was single action and could be fired more accurately.
Add to all of this the fact that a 1911 was significantly more expensive than a standard service revolver (the difference being around $100 or more in today's dollars, adjusted for inflation). More so once you factor in the higher cost of ammunition and extra magazines. Without extra magazines the value of magazine loading is negated, whereas with a revolver there's nothing particularly more that needs to be purchased for the gun other than a holster and ammunition (extra of which can simply be carried however is convenient, even in a jacket pocket).
Outside of the unique conditions of the battlefield semi-auto pistols were considered to be less reliable, more complicated, harder to carry, and more costly to own. Once big police departments (such as New York City) started to choose the .38 special revolver it became the de facto standard police issue sidearm across the US.
It was not until the 1970s that pistol technology would finally advance to the state where many of the drawbacks of the 1911 had been mitigated. A major innovation was firing pin blocking safeties built into the trigger or the grip (as on the SIG P220) and the advent/refinement of striker fired pistols (such as the Glock 17). The "wonder 9s" were designed such that they had integrated safety systems and the main safety was simply that the only way to make the gun go off was to intentionally pull the trigger, making them as simple to operate as revolvers without compromising safety. Improvements in manufacturing of ammunition and in the design of pistols meant that they could be expected to feed reliably as well. Use of new materials such as polymers in the pistol frame also made it possible to reduce the weight of these pistols, making them about as easy to carry as a revolver. The advent of double stack magazines (as with the Glock 17) meant that a pistol could carry many more rounds than a revolver. A Glock 17 with a full magazine and a round in the chamber can fire 3x as many rounds without reloading as an ordinary 6 chamber revolver, and with a single spare magazine can fire as many rounds with a single reload that takes around a second as would require 5 reloads of a revolver. Use of the lower recoil 9mm cartridge also meant that most modestly capable shooters could shoot such pistols fairly accurately, even if they did not train at the range rigorously.
All of this meant that by the early 1980s pistols had become as reliable, practical, and easy to carry as revolvers had been, but with the ability to carry vastly more rounds and to stay in a firefight for much longer than with a revolver.
Even with all of the advantages of the new and better pistols of the late 20th century it was still quite an uphill battle for them to become adopted as service weapons for US police departments. Glock especially had a very talented sales team that used basically every trick in the book to get police departments to adopt Glocks as their service firearms. Combined with the panic caused by the rise in violent crime through the mid 1980s due to the crack epidemic there was essentially a "perfect storm" of conditions that enabled rapid turnover in terms of the types of guns that police departments were issuing.