"Don't ever give homeless people money, they'll just buy drugs with it. Give them food instead." Number one, if they want to use the money to buy drugs and make life on the streets just a bit more tolerable, not my business. Number two, accepting food and drink from a random stranger is playing Russian roulette for homeless people, because people will tamper with the food and drink they give. Sometimes it's things like ghost peppers to give them a nasty shock, other times it's razors, needles, pieces of glass, rat poison, and other things that can send them to the hospital or morgue. It happens far more often than most realize and homeless people have to be aware of that. So they probably won't accept or consume food or drink you just hand to them because for all they know, there could be antifreeze in it. Or they might have dietary restrictions.
They can't eat that hamburger you handed them. What they can do is take that five and go and buy a hamburger they know they can safely consume, or they can buy necessities like hygiene objects, or they can pay for a medication they need, or it can go into a savings account, or it can even help them find shelter for a night. The five is far more helpful than a hamburger they can't eat for their own safety. Give them the five.