mutations that occur after reproduction are never weeded out since the genes are passed on already, so natural selection on its own can result in this, just like cancer or lower safeguards against cancer such as short telomeres in humans
They don’t raise their offspring
For the mothers, the entire time is spent cleaning and blowing water over the eggs.
It’s generally accepted this behavior is the necessary pair to their high aggression and cannibalism. It’s likely if they didn’t go through this they’d end up eating their babies. By dying, they make way for a new generation. And this is their reproductive strategy. Live a short very active life. If you survive, mate, then die and leave the hunting grounds to the next generation.
But not whether other adaptations could be possible. Fix the digestive tract issue and keep the female well fed and defending the nest in a different way