Elaborating on an earlier point, making room for the newborn after reproduction (via premature death) is evolutionarily advantageous because octopuses are cannibals…
Edit: This video has always stuck with me. A single octopus female was observed guarding her eggs for over four years.
https://www.youtube.com/watch?v=lFCQltYMLQk
They are such deeply interesting creatures.
Its a darwinian failure (or success) because it cant be weeded out by selective pressures since it happens after reproduction
We’re lucky they die so young
if there was a population that didn't starve after sex, they might out-compete a population that did, say, by passing on learned behavior to their offspring
Perhaps if they evolved a stage where the tiny things latched onto the parent for protection from being food, and lived off the parent, then the parent might evolve to produce an edible skin (for tiny octopus) and hang around longer