Matriphagy is the behavior, primarily in some species of spider, of the young eating their mother. It is not a universal behavior, but is common among some species.
"Whoa!", you say. Understandable enough. Where is all that mush about love, familial loyalty, tender sentiments? The initial reaction (at least to humans) is one of disgust or horror.
A bit deeper examination of the behavior may be in order. Snacking on mom is not an uncommon behavior. Human babes do the same thing, though in a markedly lesser degree than the spiders aforementioned. The sight of a babe suckling in the loving arms of its mom fosters feelings of care and maturnity. In a survival sense, the babe is taking resources from the mother to continue its own existence and development. Human females, as well as all other mammalian species, have developed the ability to provide nutrition and even share disease immunity via the suckling behavior.
Nature is a pragmatic old hussy, if nothing else. She provides the impulse to reproduce, a means to bring it about, and then a way to provide for the young. The cycle must be maintained at all costs. Nature doesn't seem to care very much for aesthetics as long as the mission is achieved.
Matriphagy is one of the tactics Nature uses to insure survival and eventual continuation of the species. In certain spiders, once the mother has laid her clutch of eggs and cared for them until they hatch, the mother surrenders her own body to her hatchlings for food. Before doing this she may even start a second brood of eggs. This second generation is never intended to hatch, but is laid as a rich and available food source for her hatchlings. Following this feast the hatchlings will molt. The mother will then become more active and stimulate her hatchlings, who will then swarm her and start to dine. She never attempts to fend off the brood, or launch a counter attack. Her body will start to liquify, giving her first generation hatchlings a supply of food, a banquet laid out for the drinking.
"Wouldn't it be simpler to just leave some old flies or insects lying about for the occasion? The old girl could see her babies birthed, put on her boogy shoes, and be off down the lane to another home, another brood. The kids have those insects all trussed up and ready for dinner, Mom survives, everybody wins, right?"
Don't be too hasty in your judgement. The hatchlings of those mothers who provide their own bodies for their kids nutrition attain a higher body weight, accelerated molting, and a higher survival rate once they muster forth from the nest. Spider moms who do not submit themselves to this matriphagy and who produce second clutches of eggs are actually less successful at preserving their gene lineage than the sacrificing moms.
Nature is satisfied, the spiders being more able to survive and in their own turn reproduce. Nature is quite prosaic, depending on what works rather than what may satisfy some artificial aesthetic value attached by one of her subjects.