Lucas Wiman, an MR reader, tries to explain gambling to me, using evolutionary psychology:
I think gambling is a result of a cognitive adaptation caused by the scarcity of certain kinds of resources. Imagine that an individual has need for two resources (say fruit and water). Fruit is obtained from bushes which bloom at irregular intervals, and is quickly eaten by other animals after it ripens, while water is always available at the creek. In this circumstance, it is rational (from an economic perspective) to devote more time to checking whether there is fruit available than water. Water can be easily obtained as needed, but given the irregularity with which fruit is available, it makes sense to check frequently and horde for later usage. This applied a selective pressure, so that utility was increased simply by checking whether an occasionally-available reward exists, whether it was found or not. Gambling is then a system designed to exploit this odd utility curve–by producing an occasional reward, a slot machine activates this system. After someone wins once at slots, they get a utility boost from checking whether the reward is there again.