My viewport rotation is inconsistent. Is this a bug or an option I misclicked?
The viewport is behaving as it should.
The behavior of viewport rotating is dependent on which axes are active (see the axis gizmos on the top right hand side of the viewport). The active Y axis is changing here and there (between -Y and +Y) because each time you rotate, you're not returning to the same spot and sometimes you cross over the XZ plane and the view angle is interpreted as upside-down. I assume that it rotates the opposite direction when the viewport camera is upside-down as a visual indicator of that fact.