If you are attacked by surprise, whether by a creature, a device, or simply an environmental hazard (a tree falling on you), you can move an immediate distance before the attack occurs. If moving prevents the attack, you are safe. If the attack can still potentially affect you—if the attacking creature can move to keep pace, if the attack fills an area too big to escape, etc. —the ability offers no benefit.