For me the problem was a plugin called Bootstrap for Contact Form 7 by Felix Arntz. Disabling it cleared the issue. The plugin has not been updated for 2 years, so no surprise. I didn’t bother to go deeper into why it does this, as the plugin is not really necessary anyways, just need to add the classes manually.