Could be your keyboard. If the key that you have set to move the camera gets stuck, it will do the rotating thing. Try another kb and see if that does anything.
Unfortunately, I don't own any other USB keyboards, however, your idea still led me to the problem. Examining the setting revealed I had my Xbox controller enabled, it was sitting in a position with its joystick against the desk, moving it fixed the issue.
Thank you, I doubt I'd have thought of that if you hadn't given me the idea to look for keyboard settings.