People thinking stormtroopers are inaccurate entirely missed the point in A New Hope.
We are told near the beginning of the movie, when Luke and Obi-Wan find the Jawa’s sand crawler which appears to have been attacked by Sand People, that stormtroopers are deadly accurate. This makes sense, they are trained soldiers.
Obi-Wan says, “These blast points, too accurate for Sand People. Only Imperial stormtroopers are so precise.”
We, the audience, are supposed to remember this point when later the stormtroopers are firing at Luke and friends and missing every single shot. It is supposed to make us suspicious. It should make us say, “Something isn’t right here.”
Eventually we get the prestige: those stormtroopers were ORDERED not to hit them. The Falcon had been fitted with a tracking beacon, and the Imperial forces wanted them to escape and run to their hidden base.
But no, everyone came away thinking, “It’s really stupid that the stormtroopers fired that many times and never hit the good guys just standing in the open. Stormtroopers can’t hit the broad side of a space barn!”
You're not wrong but the movies did a crap job of it. It's always better to show us something than tell us, and it told us they are good shots but showed us they suck. For basically all 3 movies.
They did show them sweeping through a horrificly deadly funnel defended by relatively well covered rebels and toasting them with no issues is the very first scene of the movie. The assault on the Tantove IV was basically suicide, and they still mopped up like it was Tuesday. The double reveal, by both Leia and Tarkin, is more than sufficient to make the point, instead of a hamfisted scene earlier of Vader giving them orders not to kill and eliminating all the tension from the escape.
Storm troopers aren’t clones at all. They’re recruited. (Rebels, you see some of that process, with Ezra and a few others. Basically, most are barely competent. The 501st is supposed to be an exception.)
There’s also plenty of examples outside this moment of storm troopers sucking- battle at cloud city, Hoth. Virtually every major engagement… even when they were supposed to be on their a-game, they suck.
Thing is, neither knows what we all know, and both have humanlike reactions. Plus redshirts don't always die immediately, just eventually. So you could get quite a long action sequence with redshirt attempting to dodge and getting more and more amazed he's not dead yet, while stormtrooper eventually runs out of ammo and it becomes a mano á mano fight (I'm sure your brain can play you the correct music for this part) until redshirt dies.
If collateral damage kills the redshirt, then technically the terrain did it. And we all know that plasma is used to move power around Federation starships, usually 3 inches behind a console. Because who needs wires and step-down transformers when you just run a thousand volts a foot in front of some poor schmuck's face.