John McQuaid in the Wall Street Journal:
Like our affection for a hint of bitterness in cuisine, our love of spicy heat is the result of conditioning. The chili sensation mimics that of physical heat, which has been a constant element of flavor since the invention of the cooking fire: We have evolved to like hot food. The chili sensation also resembles that of cold, which is unpleasant to the skin but pleasurable in drinks and ice cream, probably because we have developed an association between cooling off and the slaking of thirst. But there’s more to it than that.
Paul Rozin, a professor of psychology at the University of Pennsylvania, became interested in our taste for heat in the 1970s, when he began to wonder why certain cultures favor highly spicy foods. He traveled to a village in Oaxaca, in southern Mexico, to investigate, focusing on the differences between humans and animals. The residents there ate a diet heavy in chili-spiced food. Had their pigs and dogs also picked up a taste for it?
More here.