Didn't Obiwan comment on the accuracy of the shots on the decimated Jawa transport and said Tusken Raiders couldn't have made such accurate shots in Ep 4?
"These last points, too acurate for Sand People... only Imperial Storm Troopers are so percise"
Yet, in "The Phantom Menace"(I'm still getting used to the idea of a Star Wars film called The Phantom Menace) we see a Tusken Raider take out a Podracer with a sniper rifle. So the Stormtroopers must be really, REALLY accurate shooters, and just didn't want to show off in Ep.4-6.
They did manage to hit 3PO and the Millenium Falcon in ESB and R2, Leia and some Ewoks in ROTJ, so give them a cookie for that!
It was a lucky shot, and we don't actually know who he was aiming for.