Its not luck (except maybe with a MAC), and not really skill, as its really pretty simple once you get used to the gun.
As far as the "run up and away" theory, thats where the technique comes in. If you fight the gun, and "try" to hold the gun on target, it will tend to run up and off to the side of the strong hand, IE, up and right for a right handed shooter.
If you relax, and think of the gun more as a fire hose, and think about how you would try to keep that water on target, IE, just keep bringing it back on target, you can easily keep full mag dumps on target with little effort.
Its more about "riding" the gun and going with the flow, than it is trying to hold it on target.
As an example, one of our "contests" when we were all shooting together regularly and would get together to shoot, was to see who could put a full mag from a pistol caliber gun into a paper plate at 10 yards, with one pull on the trigger. It was usually a pretty tight contest for those with MP5's, MP40's etc, and those who shot them regularly.
This was the last target I shot with my SWD M11/9mm "MAC" right before I got rid of it. It was shot at 10 yards. Two separate mags, each with 25 rounds, one pull on the trigger with each mag, and a total time of about 3 seconds. I wouldnt have won the plate prize, but either mag would have been more than sufficient.