Unity uses floats for a lot of its operations, which means there can be quite a bit of accumulated error as rotations are converted. If the quaternions, vectors, and matrices were all doubles it would address the problem.
Right now the extractAngleXYZ functions check against an epsilon when checking how to extract.