The Stormtroopers on the Death Star are purposefully inaccurate. (Leia: "They let us go. It was the only reason for the ease of our escape.") The plan was to make it look good, but the heroes had to escape to lead Vader back to their Rebel Base.
And here's an interesting article about modern warfare (
https://jonathanturley.org/2011/01/10/gao-u-s-has-fired-250000-rounds-for-every-insurgent-killed/) that establishes that the US military... who we can assume is a baseline for trained military... has fired 250,000 rounds for each combatant killed. By that standard, Stormtroopers aren't doing too bad...
The first half is, as far as I know, correct; Darth Vader was deliberately using the Force to ensure that the heroes escaped. In the full movie, we learn later that there was a tracker placed on the Millennium Falcon. From there, fanon spread, as it often does; was accepted as fact; and finally entered the franchise official, as sometimes happens.
This statistic was derived by taking the total rounds expended, and dividing by the number of enemy combatants killed. It has a few flaws:
1) It includes all rounds fired in training, which typically includes most of the career of a soldier, and the vast majority of rounds fired.
2) It seems to include only killed enemy combatants. The NATO 7.62mm round is designed to wound, rather than kill, on the grounds that a wounded enemy requires more resources; while a dead enemy can be buried, a wounded enemy requires medical care, food, and housing.
3) A minor point; however, most rounds fired in combat are still not fired with the intention of killing the enemy, but rather to suppress them so that flanking movements can get into range to kill them.
Simply eliminated the rounds used in training from consideration reduces the number of rounds under consideration by at least three orders of magnitude.