By buying them food you're not enabling any bad habit they have like alcohol or drugs so I see no problem with it. If I give anything to someone homeless it's always food or a drink, never money. I'm sure it's appreciated and in the end you're helping a pup