I believe giving free coffee to police officers isn't so much a kind gesture as it is a way to entice officers into stopping in there for a drink instead of somewhere else. Police presence is a visual deterrent for someone thinking about robbing the store. If I ran a store that offered beverages like that I'd do the same thing for people that I know legally carry firearms so that next time they want a drink they'll come to my shop instead of the one on the other side of the street because I offered them a free drink for their presence.
Giving food at a discount price is up to the restaurant. Just like some chain restaurants aren't corporate ran, they're a franchise, some of the rules are up to the management.
Huh? Don't cops OC, therefore making themselves a desirable priority target that will draw criminals into the store?