To the octopus, the scuba diver was a threat. Thus it used shells to cover up not knowing what was going on blinded by the light.