IMHO cruelty is to be avoided to the extent it practically can be. Not so much because it inflicts pain on other sentient beings. But because of the morally corrosive effect gratuitously or needlessly inflicting pain has on the person inflicting the suffering.

Torturing small animals is one of the red flags warnings of a child turning into a sociopath.

If you must kill, for whatever reason, then some care should be taken to do it as humanely as reasonably possible. You shoot the rabid dog to eliminate a clear and present threat, to end the suffering of the infected animal that will die tortured, and because there aren't other practical options.