It's a misunderstanding that evolution leads to only positive behaviours remaining. Eating your own tentacles might be similar to humans cutting themselves, or the stress response behaviours spillover by zoo animals: a spillover réaction that turns adaptive behavioural patterns (eating) into maladaptive (eating yourself)