I guess the evolutionary advantages don't exist as their prey are usually small and a single octopus wouldn't have trouble hunting by themselves.
And outside of teaming up to thwart predators, but I don't think that would help against sharks unless they have a much higher intelligence and can outsmart them like how humans have evolved to do. So not really clear to me why they are living nearby, aside from abundant food and no pressure to explore new areas. So it comes back to maybe they are social. Next thing you know, they'll playing underwater pickleball with each other.