It wasn't that they missed on purpose so much as only a few dozen were sent to harry the rebel intruders.
There was probably a couple hundred thousand stormtroopers on that station. At any time after the prison break they could have locked down the station, sealed every blast door, ejected the Falcon out into space and stationed a full platoon in every hanger bay. But no, they just herded them all back towards that docking bay. Same with the TIEs. They could have launched a full wing, called in a destroyer and cruisers for support, but no, all they sent was a single flight.
Now I don't think the troopers or pilots were told any of this, but it'd hardly be uncharacteristic for the likes of Tarkin & Vader to deploy their forces in inadequate numbers, knowing about half of them would be gunned down.
It might also be more helpful if one were to not think of Stormtroopers and their blasters in terms of modern military fire teams and think of them as being more like 19th century musket lines. It's not about precision or superior firepower, it's about how many rounds you can throw downrange until you win by attrition.
Again remember, they're not really professional soldiers but disposable blaster fodder. Their training probably spent more time teaching them how to form ranks, polish their armor and recite loyalty oaths to the glory of the Empire than target grouping, trigger discipline and how it's not a great idea to run straight at an enemy that's shooting at you.