While the extraordinary life span of queens and division of labor in eusocial societies have been well studied, it is less clear which selective forces act on the short life span of workers. The disparity of life span between the queen and the workers is linked to a basic issue in sociobiology: How are the resources in a colony allocated between colony maintenance and reproduction? Resources for somatic maintenance of the colony can either be invested into quality or quantity of workers. Here, we present a theoretical optimization model that uses a hierarchical trade-off within insect colonies and extrinsic mortality to explain how different aging phenotypes could have evolved to keep resources secure in the colony. The model points to the significance of two factors. First, any investment that would generate a longer intrinsic life span for workers is lost if the individual dies from external causes while foraging. As a consequence, risky environments favor the evolution of workers with a shorter life span. Second, shorter-lived workers require less investment than long-lived ones, allowing the colony to allocate these resources to sexual reproduction or colony growth.