>this leaves open the question of how noxious stimuli (thanks) lead to avoidance behaviours, if they are not unpleasant.
It triggers networks that are designed to cause avoidance behaviors, for example the withdraw reflex[1]. Reflex networks do not require any conscious experience of the stimuli that triggers the specific action.
>why most animals but not insects? What is different about insects?
The size of the set of possible unique behaviors, complexity of brain, existence of higher order brain processes.
Like Retric says, this leaves open the question of how noxious stimuli (thanks) lead to avoidance behaviours, if they are not unpleasant.
My explanation is that the unpleasant sensation of pain makes the animal try and avoid the stimulus that causes the pain. What is the alternative?
Edit: also, why most animals but not insects? What is different about insects?