They live in complex environments. Often on the boundary between water and land. And some octopuses, do seem to make good use their intelligence - for example the mimic octopus.
I guess an important thing is that they hunt in this environment (in which clams also do just fine). And, like us, they don't have much bodily defence against being eaten by others.