Why do we like the bitter taste of coffee? Bitterness evolved as a natural warning system to protect the body from harmful substances. By evolutionary logic, we should want to spit it out.

But, it turns out, the more sensitive people are to the bitter taste of caffeine, the more coffee they drink, reports a new study from Northwestern Medicine and QIMR Berghofer Medical Research Institute in Australia. The sensitivity is caused by a genetic variant.

"You'd expect that people who are particularly sensitive to the bitter taste of caffeine would drink less coffee," said Marilyn Cornelis, assistant professor of preventive medicine at Northwestern University Feinberg School of Medicine. "The opposite results of our study suggest coffee consumers acquire a taste or an ability to detect caffeine due to the learned positive reinforcement (i.e. stimulation) elicited by caffeine."

In other words, people who have a heightened ability to taste coffee's bitterness -- and particularly the distinct bitter flavor of caffeine -- learn to associate "good things with it," Cornelis said.

Thus, a bigger tab at Starbucks.

The study will be published Nov. 15 in Scientific Reports.

In this study population, people who were more sensitive to caffeine and were drinking a lot of coffee consumed low amounts of tea. But that could just be because they were too busy drinking coffee, Cornelis noted.

The study also found people sensitive to the bitter flavors of quinine and of PROP, a synthetic taste related to the compounds in cruciferous vegetables, avoided coffee. For alcohol, a higher sensitivity to the bitterness of PROP resulted in lower alcohol consumption, particularly of red wine.

"The findings suggest our perception of bitter tastes, informed by our genetics, contributes to the preference for coffee, tea and alcohol," Cornelis said.

For the study, scientists applied Mendelian randomization, a technique commonly used in disease epidemiology, to test the causal relationship between bitter taste and beverage consumption in more than 400,000 men and women in the United Kingdom. The genetic variants linked to caffeine, quinine and PROP perception were previously identified through genome-wide analysis of solution taste-ratings collected from Australian twins. These genetic variants were then tested for associations with self-reported consumption of coffee, tea and alcohol in the current study.

"Taste has been studied for a long time, but we don't know the full mechanics of it," Cornelis said. "Taste is one of the senses. We want to understand it from a biological standpoint."