I think the point the other guy is pointing out, is that good and bad evolutionary traits are often connected - or more helpfully stated, evolutionary traits can have both benefits and drawbacks which don’t immediately seem related to the same trait.
It’s quite possible that octopi sex dementia is just a drawback to another trait which is very beneficial, so the dementia was just a bad aspect of a good trait that propagated forward. This happens all the time in different animal biologies.
That is not how your comment reads. It reads like you think every trait exists as an advantage and propagates because it is a benefit. Plenty of traits propagate as side effects, which is how their comment read to me.