Why does rotating this MeshPart on one axis change all the other axes?

Whenever a player fires their gun, the orientation of this meshpart is changed at random on the X-axis. However sometimes the part gets rotated all wrong.
I’ve found that rotating this part on the green axis changes the other axes’ orientation as well, why does this happen?

roblox studio uses YXZ rotation order and you have rotation of the Z axis, so it needs to change the rotation of the other axes in order for the rotation on the Z axis to appear the same