Because of the flip, the North pole of the electromagnet is always above the axle so it can repel the field magnet's North pole and attract the field magnet's South pole.
(the North pole of the electromagnet; is; T:always; above the axle; so it can repel the field magnet's North pole and attract the field magnet's South pole) (it; can repel; the field magnet's North pole) (it; attract; the field magnet's South pole)
the North pole of the electromagnet it it
is can repel attract
T:always above the axle so it can repel the field magnet's North pole and attract the field magnet's South pole
the field magnet's North pole
the field magnet's South pole