Take a step back and look at film and TV before the Beretta. You had a ton of snubnose revolvers in the hands of criminals and detectives, 1911s in the hands of a few extra tough detectives, 4" Model 10s on the belts of police. Sprinkle in a few different 380 and 32acp pocket pistols and that is about it.
This pretty accurately reflected the reality of handguns in the real world too. Oh, there were a ton of top break 32s and 38s floating around even in the 1950s and 60s which never seemed to show up on film, and I suspect that there were a lot more pocket 32s and 380s in the real world than was represented on TV/Movies, but it was close. Now, hollywood depictions were about 10 years behind the curve. In the 70s you saw the beginnings of police switching over to semiautomatics. By the early 80s it was going strong. Which guns? Smith and Wesson 39s and Beretta 92s...there weren't a ton of other options.
You only very very rarely saw a hi-power either in real life or Hollywood.
Along came 'Beverly Hills Cop' and while it was a very funny movie, it was really one of the most popular action movies of the day. It was one of the first times you saw a hi-power in the hands of the police...and it fit. Detective in Detriot needed a serious working gun, guys in hollywood still had the old standby 38 snubnoses. Of course, the hi-power really isn't very distinctive, and it was humor moreso than action that carried that movie.
Think to yourself, what other double stack 9 was around in the 1970s and early 1980s? (S&W 59 is all I can come up with) and of course, Beretta 92F.
The next big movies to hit the 'action world' were Lethal Weapon and Die Hard. Aside from the guns being used, these were seen as the first of the 'new generation of action movies' and just like when a comic book movie gets huge box office (spiderman) two things happen: Other studios copy the heck out of the idea and the existing studio starts going for sequals, that's exactly what happened with these two. Lethal Weapon and Die Hard set the standard for action movies, and many details were simply copied.
And what guns do we see in Lethal Weapon? Well, the old cop is using his trusty smith and wesson model 10 38 special...and the elite crazy dangerous cop has the elite crazy dangerous Beretta 92. That was probably a little bit of luck, but a little bit of reality as well. Many police departments had moved to the semiauto. Obviously it didn't fit for him to have the standard 38 special, nor really a 1911. Neither of those fit the character. A hi-power would have been fine or a S&W 9mm of some kind, but I hear the Beretta 92 was exceptionally easy to convert to blanks. It also helped set up the 'young guy vs old guy' dynamic that got played a lot in those movies.
I can imagine some hollywood exec talking to the company who was supplying the props saying 'The Murtaug character needs the 'regular' cop gun, and the Riggs character needs the 'new' cop gun, one of those black square angle-y ones'
The armorer says 'something like this?' holding up a Beretta 92'
The hollywood exec replies 'Yes that, exactly!'
Even moreso, in Die Hard, the Beretta 92F is right there huge on the movie poster. And that is standard movie poster fare....action hero with gun held by head. Die Hard wanted a modern cop and modern guns, so the Beretta 92F definately fit with them...as did the H&K P7 and the Steyr AUG. (In fact, Die Hard is probably the first introduction most people have to the H&K P7, and almost everyone who sees that gun says 'ohh like in Die Hard! The only reason the P7 sales didn't skyrocket is because most people who saw one and asked about it at the gunstore were set back by the price)
So in addition to securing the Military Contract which meant no matter what we'd be seeing the Beretta 92 in war movies, Beretta happened to (partly by chance, partly because there just weren't a lot of other options to go with) get itself included on two action movies that were both blockbusters and both had a HUGE impact on all subsequent action movies....and it had a price point that the average Joe could afford.
This solidified the Beretta 92F as a gun you'd see a lot at the range, but also in subsequent hollywood productions.