A vacuum breaker prevents backflow by pushing air into the system, creating a pressure difference. The water is likely to flow toward the air which is being pushed in. If the water were to flow in the opposite direction, then there would not be a pressure difference, so the air being pushed into the pipes will force itself past the water molecules.