Motor cables are defined as long when the motor frame is not bonded close enough to the drive panel to be considered a single ground plane. To be considered a single ground plane, the parts must be connected by a surface which is no longer than ten times its width.
If you place the wire near a permanent magnet, this temporary magnetic field interacts with the permanent magnet field. You will know that two magnets placed near one another either attract or repel. In the same way, the temporary magnetism around the wire attracts or repels the permanent magnetism from the magnet, and that is what causes the wire to jump.