I’m not sure why you keep calling those two vectors axis and direction. They are not that. You seem to be having some misconceptions about what those two vectors represent, making you confused about the results you’re getting. Those two arguments represent two endpoints of the rotation arc placed on the unit sphere. Like q and q1 on the illustration below. The theta is the rotation arc/angle and the actual rotation axis is the normalized cross product of q and q1.
For every case where q and q1 are not colinear, there is a single unambiguous rotation axis that rotates q into q1 along the arc theta.
Now, if q and q1 are directly opposite, the angle becomes 180 degrees and rotating q around any axis perpendicular to either q or q1 will rotate it into q1 position. Hence there are infinitely many axes (and arcs) that will do the job.
However, in your case, you’re not rotating a singular point but the whole object/basis. So different rotation axes will result in different final orientation of the object, even though its position will always be properly rotated into place.
