THIS. The life expectancy of an octopus is extremely low - https://en.wikipedia.org/wiki/Octopus#Lifespan - and they're all-in on the "extreme number of offspring, microscopic survival rate" strategy. So for a male - it's a fairly reasonable tactic to end up as a big, nourishing meal for the female that will go all-in on producing the eggs of your decedents.
Both parents are all-in, probably because some less malleable trait or characteristic, whether environmental or hereditary, requires them to be so.