"I have had to rewrite this response so many times that the thread is probably on page 5 by now with all this already said.
Because someone is homeless and begging for money does not oblige them to accept food you want to give them.
Because someone does not want food does not mean that anything is being thrown in your face. Perhaps he needed soap, loo roll, a toothbrush, paracetamol, a bus ticket, socks, etc. Perhaps his dietary requirements are such that the food you wanted to give him is not suitable. Perhaps he feels offended by the implication that as a homeless person who is begging he cannot be trusted to use any money he gets to buy his own choice of food.
If you are willing and able to give to someone in need then that's great. It's a nice thing to do. I'm sure your initial offer came from a place of kindness. But if someone does not want what you wish to give, then you should not get offended and criticise their lack of gratitude. It's not about your needs (to feel like you helped, to able to congratulate yourself for Doing Good) but theirs, surely?
I'm sure you're very nice. To have even wanted to offer help suggests that. But this post makes it look as though you're nice to the homeless and destitute as long as they know their place and respond to any offer you make in a way that you approve of and which helps boost your self image. It's fine not to give money. I totally get why people choose not to. You're under no obligation to do it and many people (such as the Big Issue founder) argue against doing it. What is not fine is this sort of "they should be grateful for and take whatever I want to give whether they need it or not" approach. It's belittling and petty."
Totally agree with alltouchedout
Also, to the person who suggested "it probably would have gone down better to approach him first and ask him to come with you to the shop to pick something and you'd pay" ... Um. Are you really saying you'd invite a random man you'd never met to come on a nice little stroll with you to the shop, wander about, stand in the queue making awkward chit-chat, then give him his treats and send him on his merry way - really? You would really do that, or think anyone else would? Come on!