Im guessing that something about the way Unity implements the total rotation involves a simplification of the two rotations, which involves floating point numbers.
Floating point numbers are notorious for being inaccurate, see here and here.
As for preventing/correcting this problem, I think there are many different solutions, but a simple one might be to convert your angle to an int before rotating.