Believed causes are the stepping motion done while crouched, or possibly a slight offset in how your model is rearranged when turning rapidly.
This bug is unlikely to occur in actual missions, but can be easily done any time you have a weapon, and can sometimes happen accidentally when surprised or when releasing and grabbing particularly sensitive mice, the latter being how I initially noticed it.
Edit: Specified that this only occurs with rifle type [primary] weapons