@Dmitriy "controller" does not give any data from "gradient" to "main". You store named attributes in the "controller" object. But they are local attributes to that object, not global attributes - they do not exist outside of it. If you want the relative rotation of "gradient" to "main" object, then you need an Object Info node on the "main" object, select the "gradient" object in that node and set it to Relative.
@MarkusvonBroady Of course rounding errors accumulate - but I don't see that anyone doubted it. It simply was no rounding error. It was only two objects, not a chain of 1000 parentings. As you said, OP just did not understand that the reference frame on which the rotation was based was rotated in itself, therefore the angle was ≠ 0°. But it was already explained, my elaborate answer (which the OP saw) stated that, too. Just deleted it after it became clear that he is asking something else.