The standard Bootstrap components .nav-pills and .nav-tabs are overriden at small sizes.
It would be better if deviations from standard Bootstrap had a specific class added to them so that they were opt-in and people who had used the standard classes in 3rd party code or content wouldn't be suprised by style changes they weren't expecting.
If you paste any of the examples from the following page, particularly the nav-tabs and nav-pills ones:
Into a moodle, you'll see they get styled at small screen widths:
The change may have been introduced as part of
MDL-68299 theme_boost: theme updates for accessible zoom