It seems to me that our attitudes to the pain of animals are three-fold:
- It is important for humans not to cause severe pain to non-human animals.
- It is not important for humans to prevent severe pain to animals not under human care.
- It is important for humans to prevent severe pain to animals under human care.
The importance of not causing severe pain to animals, whether these animals are wild or pets or farm animals is manifested, for instance, in our laws against cruelty to animals and in our moral outcry against cruel hunting methods.
On the other hand, scientists routinely observe wild animals causing severe pain to other animals in the wild, and do not intervene in the process, and I have never heard anyone criticize them for this failure to intervene. Likewise, nobody makes it their life-work to legalize a special kind of safari where marksmen who have passed accuracy tests relatively painlessly shoot lions' prey in the head just before the lions reach the prey, as well as seeking out and killing animals that look like they are suffering from painful diseases. Yet such safaris would prevent instances of severe pain to wild animals.
Finally, the importance of preventing severe pain to animals under our care is exhibited by a whole host of practices such as the use of anesthesia in veterinary care or the euthanizing of elderly pets.
I think the best way to make sense of the data is to postulate us accepting a view on which (a) severe pain to animals is not a great evil in and of itself, but (b) to cause severe pain to animals is to behave in a particularly vicious and censure-worthy fashion, and (c) we have special duties of care towards some animals often in exchange for goods we receive from the animals (labor, milk, meat, entertainment, companionship, etc.)
Points (a)-(c) fit with the Kantian idea that what makes cruelty to animals wrong is not primarily the harm to the animals, but the dehumanization of the cruelly behaving person, though I don't want to endorse the Kantian idea.