This expression has gained greater popularity due to the advent of multiplayer games in which a "sniper" weapon is available to players. However, in the strictly military sense, there is an inherent fallacy in this advice.

First, a sniper type weapon generally has a slower reload rate than many more modern (and less accurate) weapons. They are generally single shot weapons, specifically bolt action rifles, which require some time to reload and re-aim before being ready to fire again. Therefore, if you find yourself confronted with a sniper, moving immediately after a shot allows you to take advantage of the reload window, during which the sniper will not be able to kill you.

Second, since a sniper generally won't reveal his or her presence until a target is lined up, if you're still able to move after the sniper has fired a shot, he's not aiming at you. Therefore, you should find cover quickly, before he CAN aim at you.

Finally, if everyone freezes whenever a sniper fires a shot, it is easy for the sniper to select their next target, as all of the targets that were previously considered are in the same place. If an entire group moves at once after a sniper fires, it is extremely unlikely that the sniper can track all of the targets simultaneously and at least a few of the would-be survivors will reach cover.

In conclusion, if you find yourself confronted with sniper fire, it's best to move immediately after the sniper has fired, and find cover before he can fire again. After that, you're on your own.