Following path cause a lose of rotation axis
This strange behavior is called gimbal lock. It is caused by the interdependency of the three rotation axes.
When the middle axis (Y in the case of XYZ rotation) is set to any value which results in a ±90° rotation, the first axis is aligned with the last. At this point, a change to the first or last axial rotation can only rotate around the last axis (Z in the case of XYZ).
A good example can be seen in this gif by Peyman Massoudi:

Notice how the red X ring is rotated to the blue Z ring.
The solution is to use axis-angle, quaternion or a different rotation order (e.g. XZY, ZXY, YZX,...) to rotate the object.