Essentially the Z-coordinate of the Head Pose NBT data, rotates about a fixed reference frame (i.e. it relies on the Rotation NBT data tag to determine which way it rotates), whereas the X-coordinate rotates about the Y-coordinate, using that as its reference frame (i.e. it relies on the Y-coordinate Head Pose to determine which way it rotates)
You can play around and visualize the movement on this website (which mimics exactly how it behaves in-game): https://haselkern.com/Minecraft-ArmorStand/
Try setting the Y-coordinate of the Head to 270, and then sliding the X-coordinate which moves the head as expected, but the Z-coordinate moves the head along the same axis as the X-coordinate, instead of perpendicular to the X-coordinate rotation.
Proposed Solution
Make the Z-coordinate's reference frame be the Y-coordinate (so that both the X-coordinate and Z-coordinate use the same reference frame). This will result in the Z-coordinate being perpendicular to the X-coordinate.
Comments 3
I'd like to request a reopen for this; it could be resolved like the article even states.
This absolutely seems fixable to me, and the current resolution is absolutely wrong. (How is it invalid, because it is a known phenomenon? That'd make it more won't fix than invalid, nor was this mojang's decision...)
This fix would allow for a more wider range of motions for the armor stand head.