There are many issues involved, different people, different animals, different situations.
I know we are not supposed to spend an extreme amount of money on an animal as opposed to a human. However, a reasonable amount of money (and we could sacrifice entertainment or something in the budget to allow for it) isn’t necessarily bad if the animal is a comfort for a person who, like myself, is helped psychologically by it a great deal.
Elderly people and people who live alone, have depression, etc. can sometimes get more therapeutic benefit from the love and companionship of a pet than from years of therapy. Not that I’m saying go quit therapy! :nope: - I’m simply sharing what has helped me. And I belong to a club that rescues unwanted rabbits and also takes rabbits to visit handicapped people and nursing home residents. There’s not much that can top watching the unresponsive lady with Alzheimers light up and reach out a shaky hand to pet a bunny. 
When my animals’ quality of life has declined, and especially in these difficult economic times, I have had to be more willing to put them to sleep sooner than I might have were my finances better. My last bunny that died was pretty elderly and I felt as certain as I could that a bunch of costly tests and treatments (if there were even any that were feasible) would probably only delay the inevitable a little while. 
On the final night I had her with me, her decline was rapid. That made the decision easier on the one hand. I would not be able to try anything heroic and I didn’t have the money to. But I was also keeping a close eye on her condition and thought to myself that if her dying and the attendant suffering dragged out too long, I would have to get her somewhere to have her put down. About the time I made that decision she began to slip into a coma so I just held her until she passed. :bighanky:
So I guess I’m saying, you just have to do the best you can to balance it out. Know your animal, pray for guidance - St. Francis has always been my go-to Saint with the pets. :gopray:
One final thought - don’t forget that we have learned about human health from observing animal health, and that veterinarians perform valuable services such as monitoring outbreaks of disease that can be passed from animals to humans (bird flu, Mad Cow disease, etc.) and they deserve to earn a living. So good is happening indirectly.
We should help people directly, and spend our discretionary money wisely as well. And some things such as pets are not easily categorized.