When on earth could Maya add PreTranform and Lcl Rotation properties when exporting FBX?

One animator just animated two sequences on one exactly identical rig and exported with identical script. Animations exported from each source file shows different rotation in Unreal Engine 4. And when reading raw properties with fbxsdk, one comes with {0,0,0} PreRotation and the other shows {0,180,0}. How on earth should this happen? Any idea would be very appreciated!

Could be issues with how eulers are calculated.
With eulers, depending on the rotation order, 0, 0, 0 can be the same as 0, 180, 0 due to gimbal locks.
It is worth double checking that the rig’s in both files ARE exactly the same, this could potentially be a case of your animator fiddled with the rig in one and has since forgotten / or doesn’t think it is relevant to the problem ( I have had this happen many, many, many times )

Either you have a bug in maya/fbx/unreal or you have a user error