Hello,
Adding to Ronny's reply: some manifolds have a function that translates between how we represent a tangent vector and the actual tangent vector (in the embedding space for example).
The function is called tangent2ambient.
For most manifolds, that function is identity: there is no difference between the actual tangent vector and the way we represent it numerically.
But for SO(n) (rotationsfactory), tangent2ambient is not identity: a tangent vector at X is of the form XO where O is skew-symmetric. We numerically store O. But that O "represents" XO. So, tangent2ambient transforms O into XO.
To be honest, while this is (arguably) a good thing to do numerically, it has been a source of confusion for lots of users. This is all documented in "help rotationsfactory". Also, the tools checkgradient and checkhessian have some extra warning messages built-in to detect if users run into errors that may be related to that confusion and try to be helpful, but if you happen to have other ideas for how to make these things clearer, feel free to let us know.
Best,
Nicolas