Why is it wrong to adjust the camera's rotate to the spatial orientation of the mouse?

Why is it wrong[…]

Too many reasons. Lemme guess, this makes the camera spin like crazy? What are you trying to do? Point the spring arm in the direction derived from cursor location?

Point the spring arm in the direction derived from cursor location?
That’s what you said. How do you do that?

What you’re asking for is illogical. Think about it. Let’s say this is the red cursor:

If I rotate to its orientation…

…the cursor is still to the left because the cursor lives in screen-space. You may need to re-think how you want it to work. You’d need at least some point of reference, like the player’s forward.

Is there sample code?

Is the following method of changing the rotation matrix of the camera by the direction of the vector correct?