>>346701Pain is a necessity for survival. It won't be the same kind of pain for every animal, but some sort of response is necessary for the animal to know that its in danger from some outward, possibly harmful stimulus.
A cockroach will struggle if something is pressed down on it.