It's also possibly to do with their lack of shell. While other molluscs have a shell to protect them Cephalopod do not, perhaps this forced the evolution of a more capable brain.
This. The cuttlefish (a relative) changes the color of it's skin and texture to hide from hunters/prey. If you have not seen this video, prepare to be amazed: https://www.youtube.com/watch?v=PmDTtkZlMwM