There are many homeless people who have pets, usually its their only friend in life. It is very scary however, that these people will give their only food of their day in the soup kitchen to their pet, thus themselves going without.
The RSPCA NSW has just brought out a program called Living Ruff, the RSPCA donates pet food to soup kitchens, so both get a meal and will vet check, vaccinate, microchip and desex their animals for free. This program isn't really that well known, but I think its really important.
If I see a homeless person with a pet, I will ask if they will be in the same place tomorrow and if they say yes, I will bring in blankets, food, toys, bowls etc. for their dogs. Of course I'll bring something in for the person too. Usually I don't give others money but it doesn't hurt to see if the person would like something for lunch or at least a bottle of water.
You can't help if they have pets or not, whether you agree with them keeping their pet or not. But you can help out. I find it much more efficient than questioning if its ethical or not.