There are two ways to phrase the question. First, why would a bee sacrifice its life to sting me. Second, why would Nature design the bee so that it dies after it stings? The answer to the second question is that after stinging the bee’s life is not worth living. The answer to the first is that it wasn’t worth much before either.This answer is similar to the economics of rational suicide (depressing, I know). According to this theory, one reason to commit suicide is that it is no longer worth living. If life gets too bad, the person opts out.* A statement of the rational analysis of suicide is given here by Gary Becker and Richard Posner.
Their purposive behavior approach gives insight into the economic behavior of what they call "miserable" people. More than just an analysis of suicide, they are able to explain why people in desperate situations would rationally take more risks. The Becker and Posner suicide argument is that "miserable" people use suicide as a way to opt out of a bad outcome in a gamble. This opt out ability implies that the downside of gambles isn't as bad for people in desperate situations relative to the upside.
I would like to conclude by demonstrating that the creators of Lost know their economics of rational suicide (spoiler alert). On last night's episode, we encounter a suicidal Charlie Pace (one of the important characters in the show). He walks across the street without regard for whether cars will run him over. Later in the episode, he grabs the steering wheel from the passenger seat, causing his car to crash perilously into the harbor.
Why would he do this? On last night's episode, Charlie reveals that he had recently seen events in his alternate reality (or flash sideways). In his alternate reality, he had found true love (with Claire, another character on the show). Relative to his present drug-abusing life, he found his life no longer worth living.
In his present reality, Charlie is dealt with as a drug-abusing and mentally unstable individual (which he surely is). As a society, we might even say that Charlie needs protection from himself. But, that's where the storyline surprises us. We find ourselves hoping that Charlie can "flash-sideways" to his alternate reality to be with Claire. Given the broader perspective, the creators of Lost take a surprisingly Becker-Posner approach: He has a better option, and the theory helps us understand his risky behavior.
*We typically focus on mental illness or the immorality of suicide, and those points are important. But, it turns out that assuming that the individual is mentally ill does not allow for a well-founded economic analysis. Saying that suicide is caused by mental illness is like allowing the individual to change his preferences. It might be true that people's preferences change, but economics attempts to explain how changes in opportunities lead to changes in behavior. This is because with changes in preferences, we can explain any behavior. Therefore, a central tenet of economic analysis assumes stable preferences (or at least preferences that cannot change arbitrarily).