Suppose you're God. It's the sixth day of Creation and Your project for the day is to design a man and a woman who will be fruitful and multiply and replenish the Earth. Then You plan to take a rest and let the Universe unfold on its own. The problem is that once You cede control, Your free-willful creatures just might screw up big time. Your one and only chance to avert disaster is right at the Beginning, when You endow human beings with the preferences that will forever guide their choices.
For example, it would be a major catastrophe if Your people routinely forgot to eat. To guard against this, You have a choice of two strategies. You can create people who are very smart and self-aware, so they'll go around saying things like, "Hmmm ... I'm currently burning 315 calories per hour, which means I'm three-point-seven hours away from needing some fresh protein in order to maintain my blood sugar at the optimal level, so I think I'll cook a steak." Or you can create people who really like food, so they'll go around saying things like, "Man, I could sure go for a steak right now." Neither option is perfect; the first requires an awful lot of brainpower (which in turn requires an awful lot of energy, which might be difficult to maintain), but the second can lead to grotesque excesses (think of Bill Clinton let loose in a McDonald's). On balance, You settle for a dollop of the first and a whole lot of the second.
Likewise, if Your people are going to be fruitful and multiply, they'd better remember to have sex. Again, there are two approaches. You can create people who love children and are smart enough to realize that if they want children, they've got to be willing to have sex; or You can just create people who love sex. In the first case, Your people go around saying, "Hmm ... that new neighbor seems to have some genetic traits that would nicely complement my own. I think we should swap some DNA." In the second case, they go around saying, "Man, that new neighbor is hot!" Again, You're trading off the need for lots of brainpower against the risk of grotesque excesses (think of Bill Clinton let loose in the Oval Office). And again, You opt for a little of one and a lot of the other.
The whole thing is like a game, where God's goal is for humans to thrive and replenish the Earth, while the humans' goal is simply to feel good. God—the Prime Mover—gets to go first, by writing design specs for the human psyche. Humans go second, taking their psyches as given and deciding how to behave.
At least some of that behavior consists of yielding to unhealthy temptations—eating the cashews that are right in front of you even though you know you shouldn't. At first blush, it might seem odd of God to make you crave things that are bad for you. But His motivation is simple: Through most of human history, when food was scarce, eating all the available cashews has been good for you. God's strategy—or Nature's strategy or Evolution's—is imperfect, but on balance it advances His cause of keeping humans well fed and healthy.
So, we're tempted by the things that are good for most of the people most of the time, even if they're not good for all of the people all of the time. That's a nice simple theory and it seems to make sense. But here's what it fails to explain: The same cashews that demand to be eaten when they're directly in front of you are relatively easy to resist when they're hidden in the pantry (even though you know they're there). That's a riddle. If cashews are ordinarily bad for humans, they shouldn't tempt us in the first place. But if cashews are ordinarily good for humans, they should call out just as irresistibly from behind the pantry door as from the table next to you.
The riddle, in other words, is not "Why are we tempted?" but "Why does our level of temptation vary so dramatically in response to small changes in our environment?" Economists Larry Samuelson and Jeroen Swinkels have recently attacked this riddle by rethinking God's (or, in their formulation, Nature's) optimal strategy in light of an important principle from game theory: A wise player will always ask, "What do I know that the other guy doesn't know, and what does he know that I don't know, and how should all of this affect my strategy?"
If God were to ask this question, Samuelson and Swinkels surmise that He'd it answer it like this: "I know more general facts about nutrition than My people do. I know how much protein they need. I know how much sugar they need. I know how much fat they need. And I know they're not smart enough to calculate any of this on their own. On the other hand, they're going to know more about the specific dangers of their environment than I can foresee. They'll know—or at least know better than I predict—which swamps are treacherous, where the saber-toothed tigers are likely to be hiding, and whether a great storm is brewing. I know the generalities because I made the world. But I can't know the specifics because the specifics keep changing. By the time the saber-toothed tiger comes out of its lair, my role in this game will be long over."
Given that analysis, Samuelson and Swinkels argue that God's optimal strategy is clear: In cases where only general knowledge matters, He designs us to be ruled by instincts that reflect His wisdom. But in cases where specific knowledge is important, He suspects we know better than He does, so He allows our intellects to override our instincts. When the cashews are right in front of you, all the relevant knowledge is of a general sort—cashews are either good for you or they aren't—so your puny human brain has very little to contribute and that's why it turns off. But when the cashews are in the next room, it becomes important to know whether there's a tiger between you and the cashews, which is something God didn't know back at the design stage. He therefore figures you're better equipped to make this decision than He is, so He's designed your brain to turn back on.
(Of course in modern suburban households, there is almost never a tiger between the living room and the pantry, but that's beside the point. God only gets one move in this game, and he has to come up with design specs that work in most circumstances, not in all. Through most of our evolutionary history, tigers were a problem.)