It detected, or felt both, and reacted. It didn't think, that dude touched me, I have to swim away. They aren't like, that hook hurts, swim away. It's far more basic resonse than that. It's a foreign sensory input their brain and nervous system reacted to. If they couldn't feel the hook, they wouldn't react, and therefore there would be no fight.