Our changing diets are largely to blame.

In a study published in the latest Nature Genetics, Cooper and his research team looked at calcified plaque on ancient teeth from 34 prehistoric human skeletons. What they found was that as our diets changed over time — shifting from meat, vegetables and nuts to carbohydrates and sugar — so too did the composition of bacteria in our mouths.

Not all oral bacteria are bad. In fact, many of these microbes help us by protecting against more dangerous pathogens.

However, the researchers found that as prehistoric humans transitioned from hunting and gathering to farming, certain types of disease-causing bacteria that were particularly efficient at using carbohydrates started to win out over other types of “friendly” bacteria in human mouths. The addition of processed flour and sugar during the Industrial Revolution only made matters worse.