Scientists don't know for sure, but there's a good chance that the answer involves three things: protons, vitamin C and the tropical-fruit buffet our ancestors were enjoying back when they lived in trees.
The taste we know as "sour" has a direct relationship with acidity. In chemical terms, sourness is your taste buds saying "there are a lot of loose protons in your mouth right now!" Of course, protons aren't actually sour. Our bodies have evolved to interpret their properties as being sour, research shows.
In order to survive, humans need to eat ascorbic acid, also known as vitamin C. It's essential to keeping many of our cells and tissues functioning normally. Without enough of it, humans can get scurvy, a potentially fatal disease.
Here's the embarrassing thing: Most creatures can make their own vitamin C, but we can't. About 61 million years ago, the genes in mammals that coded for vitamin C synthesis mutated, according to a 2011 study in the journal Genetica. Back then, we had such easy access to dietary vitamin C that the mutation wasn't selected against.
"We lost the ability to make our own vitamin C because we ate it all the time," Paul Breslin, a professor in the Department of Nutritional Sciences at Rutgers University in New Jersey, told Live Science.
"We were eating so much fruit that we didn't miss it," said Breslin, who is also a a sensory biologist at the Monell Chemical Senses Center in Philadelphia.
Words like "acid" and "sour" get a bad rap, but modern humans are actually very fond of sourness in the right context. In fruits such as apples and oranges, sweet and sour flavors create a delicious balance that reflects our ancestors' diets and leads us to consume vitamin C. On the savory side, sourness can indicate fermentation, which has been around for humans' entire evolutionary journey.
So, if sour foods are tasty and good for us, why do lemons make humans pucker up?
"That wrinkling up of the face is some kind of a rejection response," Breslin said, "or a signaling response to ourselves and others."
Scientists can speculate as to what that signal might be, but they don't know for sure.
"Most of the fruits that we eat are not super sour," he said. "People don't go out of their way to bite into lemons or limes."
Well, most people don't. For those that do, at least they won't get scurvy.
Editor's Note: This article was updated to add Paul Breslin's position at the Monell Chemical Senses Center.