
turn this checkboxes to see gimbal lock

as you can see x and z axis are aligned and this will make wired looking motions between key frames

here is a fix
you can also reset the rotation of the empty by applying the rotation and rotate just in one axis for this example but if you are not using the values there just change the rotation mode to quaternion
also about gimbal lock watch this
basically Euler is easy to understand as a human but it has its limits for how it works . for example in rigging you would use different versions of the Euler for different bones to avoid gimbal lock and also limiting the bones for rotating in such ways that make things go wrong and also be easy to use and understand as animator