This question is really two separate ones. First, why stop reproducing early? Second, why survive beyond that point?

Let’s start with the second. A popular idea called the “grandmother hypothesis”, proposed in the 1960s, says that older women play a vital role in helping to feed, raise, and teach their children and grandchildren. In doing so, they’re still ensuring the success of their genetic legacy. There’s some evidence for this in humans: one study of Finns and Canadians found that women who live longest after menopause end up with more grandchildren, because their daughters are better at having and raising kids.

The same is true for killer whales. We know this because scientists led by Ken Balcomb have spent the last 40 years monitoring the lives, family ties, and deaths of the Pacific Northwest orcas—Granny included. In 2012, Croft, Balcomb, and student Emma Foster used that census to show that mothers clearly help their children to survive—and their sons in particular. If a male orca’s mother dies, his odds of joining her in the following year go up by three times if he’s younger than thirty, by eight times if he’s older than 30, and by a whopping 14 times if the mother was post-menopausal.

So mother orcas, especially older ones, are somehow helping to keep their sons alive (and older sons in particular). Croft’s colleague Lauren Brent worked out how in 2015. Using hundreds of hours of video footage, she showed that older females guide their pods—especially males—to hotspots of salmon, which make up the vast majority of their diet. “These whales live on a knife edge and this knowledge about when and where to find food is vital for keeping the group alive,” says Croft. That’s partly why Granny’s death was so sad. “She had a very important role to play, and her pod is in a really difficult place.”

But none of this explains why female orcas (or humans, for that matter) should forgo reproduction early. Sure, they use their knowledge to help their families, but why not continue to expand those families by having more children? After all, that’s what elephants do. The oldest matriarchs guide their herds to sources of water, and teach them the right anti-lion strategies, all while continuing to reproduce. In humans, orcas, and elephants, grandmothers matter—yet only in the first two are they also infertile. Why?

The answer lies not in cooperation, but in conflict. Animals that raise their young in groups don’t have infinite resources. There’s only so much food, attention, and care to go around. So adding an extra child to the mix—another mouth to feed, another body to watch—is partly an act of competition. And the outcome of that competition depends on the family structure of each species.

Among ancestral humans, sons tended to stay with their mothers while daughters moved out to join new families. When one such daughter begins her new life, she’s initially unrelated to anyone around her. With no relatives to help, her best way of passing her genes to the next generation is to have children. As she does, she becomes increasingly related to her new family group, and shares more and more genes with them. Now, she can also enhance her genetic legacy by helping her own relatives raise their children. She may even be better off doing so; if she had any more children, they would be in direct competition with her existing descendants.