such bad shots ?
Withstanding that the stormtroopers are spot on accurate when it's time to fire at a Jedi with a lightsaber (thus allowing bolt reflect) and that it's true than in the movies, they are under standing orders to let the rebels escape (but not at Endor...), are they such bad shots ?
-They seem to have a weapon (the blaster rifle) akin to an assault rifle or maybe more a submachine gun considering the ranges involved (as in most franchises, everyone fights at incredibly close range...), not a weapon especially made for precision firing.
-Depending on the fluff version, a blaster rifle ''power pack'', rechargable,, have enough power for 100 shots, so presumably accuracy is even less needed than in real firefights
-Except in some episodes of the Clone Wars, they never seem to actually aim (but some fluffs lampshade that the helmet allow hip firing with genuine accuracy-a HUD with a sight, for instance), which make the question of their accuracy moot (but not of their actual tactical competences).
-When not firing helplessly and haplessly at dignified teddy bears, stormtroopers seems to have been used mostly for ship to ship combat or base assault, where narrow spaces (except near bottomless pits) are common and presumably where spraying the corridor with blaster fire is a perfectly valid tactic.
(The boring answer is, of course, that the stormtroopers are very good at shooting red shirts and extras and/or heroes at very dramatic moments, but will hit something only when the plot demand it. Thank you, that was obvious)