Evolution wise. It makes sense for animals that cannot regrow limbs.
But for some animals it can actually limit their survival.
Unfortunatly human history. Has a habit of deciding based on our needs. Rather then actual evidence.
Its also worth remembering pain is a mental rather then real thing.
So while some creatures may have the signals to inform. Thjoer mind may not respond to it on the same way.
As a human(i assume ;). If you have ever needed to use opiates you may have some idea how that would work.
It is a signal warning of harm.
Your response is mental. Hence when opiates like tramadol shut of the signa. Receptors you still feel the se station of pain. But do not suffer the same way.