this might be a situation of “Gimbal Lock” (this is a special situation with Euler angles the trade off of them being easier to understand the Quaternions)
when you rotate a vector by a multiple of 90-decrees then you are now laying an axis on top of another axis, then when you go to rotate the vector again the math could rotate either, but often times it doesn’t matter, and you get strange behavior. (a direct example of this is when you have say the character is supposed to bend their legs 90 degrees, but they end up with the bottom part of the legs in the top part of their legs… it’s funny but a result of Euler Angles)
to address this you could modify Mayas coordinate system to be X forward, Z up, Y right (this might require relearning some workflows if you are used to axis keys.)
just keep in mind you would then have to take special steps working with like Unity (you can look at this thread for steps Maya to Unreal Workflow: World Orientation Z or Y up? - #3 by anonymous_user_048b75c4 )
the other option if you don’t want to change coordinate system in Maya is to pre-rotate the objects in Maya before generating your CSV outputs. as they should map at that point without the possibility of Gimbal Lock on vector math)