It's not about missing by miles. It's about simply missing. Which is extremely common. Considering most of the firefights are at dueling pistol ranges...I'm not convinced the tech is that impressive.
You will now, of course, substantiate the claim that Starfleet misses excessively.
EDIT
Looking through an old thread at SB, Viv went through all the seasons of TNG to see phaser accuracy. Obviously, it's not an exhaustive list of Starfleet combat accuracy, but we can get an idea of how well they do.
https://forums.spacebattles.com/threads/phaser-analysis-thread.122267/
There are two that he goes through where they're on the phaser range. The phaser range is basically a room where you practice hitting small moving or appearing targets. In general the range is 20 ft, but they simulate further ranges by having smaller dots you need to hit.
TNG's A Matter of Honor:
Range: 20 ft
Shots: 15
Hits: 11-13
Miss: 2-4
Accuracy: 73% to 86%
Redemption
Range: 20 ft
Results: 4/7 for Worf, 9/9 for Guinan. Worf seemed to be having an off-day.
Accuracy: 57% for Worf, 100% for Guinan
Beyond that, I went through most of the combat situations.
Hide and Q
Range: N/A
Shots: 2
Hits: 2
Miss: 0
Accuracy: 100%
Too Short a Season
Range: 30+ ft
Shots: 2
Hits: 2
Miss: 0
Accuracy: 100%
The Arsenal of Freedom
Range: N/A
Shots: 4+5 (9)
Hits: 2 + 2 (4)
Miss: 2 + 3 (5)
Accuracy: 36%
Note: They were fighting small and fast-moving, mobile drones.
The Vengeance Factor
Range: 40 ft
Shots: 7
Hits: 1
Miss: 3
Unknown: 3
Accuracy: 14% to 57%
The Hunted
Range: 1 at 10 ft/1 at 2 ft/3 at 20 ft/1 at 30 ft
Shots: 6
Hit: 4 (1 at 10 ft/ 1 at 2 ft/ 2 at 20 ft)
Miss: 2 (1 at 20 ft/1 at 30 ft)
Accuracy: 66.66%
Legacy
Range: 10 ft / N/A / 15 ft / 10 ft
Shots: 2/1/3/1 (7 shots total)
Hits: 2/Unknown/2/1 (5 hit total)
Miss: 0/Unknown/1/0 (1-2 misses)
Unknown: 1
Accuracy: 71% to 85%
Schisms
Range: 10 ft
Shots: 1
Hits: 1
Miss: 0
Accuracy: 100%
Chain of Command
Range: 3 to 20 ft
Shots: 5
Hits: 2
Miss: 2
Unknown: 1
Accuracy: 40% to 60%
Aquiel
Range: 5-10 ft
Shots: 2
Hits: 2
Miss: 0
Accuracy: 100%
Descent Part 1
Range: 10-15 ft / 10-15 ft
Shots: 8 seen, 21 heard / 3
Hits: 3 / 2
Miss: 3 / 1
Unknown: 23
Accuracy: 50% or less in the first engagement as low as 10%, 66.66% in the second.
Descent Part 2
Range: 20-30 ft
Shots: 6 seen, 1 heard
Hits: 3
Missed: 0
Unknown: 4
Accuracy: As low as 42.8% to possibly 100%
Gambit
Range: 20-30 ft
Shots: 13 seen, 3 heard
Hits: 0
Missed: 16
Accuracy: 0%
Note: The crew had been ambushed and a firefight resulted, but the enemy managed to escape with no casualties, so viv presumes that none of the pirates had been hit, although it's possible one or two of them had been stunned but rescued.
Overall, we have the lowest showing, which was Gambit.
Going with the more intense fights, we see:
Arsenal of Freedom: -- 36%
Vengeance Factor -- 14% to 57%
The Hunted -- 66.66%
Legacy -- 71% to 85%
Chain of Command -- 40% to 60%
Descent Part I -- One fight is between 10-50% and the other is 66.66%
Descent Part II -- 42.8% to 100%
Gambit -- 0%
Phaser Range (Worf & Guinain) -- 57% for Worf, 100% for Guinan
Phaser Range (Riker and Picard) -- Doesn't detail who hit what, but they had a 73% to 86% hit rate.
Overall, it looks as though Starfleet typically has an accuracy range between 40 to 60%. I can't find any reliable source right now on how often soldiers hit their marks, but at 7 yards or less, NYC police tend to hit their targets 37% of the time (Watts). 7 yards is approximately 21 feet, so which accounts for a lot of these engagement ranges. At further than 7 yards, NYC accuracy fell to 23%. In gunfights, NYC accuracy rate dropped to 18% and in situations of no return fire, had an accuracy rate of 30% (Watts).
Regardless, going by the accuracy of hits, Starfleet certainly shouldn't be referred to as "rent-a-cops".
EDIT -- Oops, forgot to link the source.
Bibliography
PolitiFact - Do more than 7 in 10 police bullets miss their mark, as this gun control advocate said?