Pretty sure it's illegal for anyone to bribe cops, but it's still a tradition as old as policing.
Not doing so does have the risk of devolving into corruption. Here's an example of it going too far that direction, where the police arrested everyone for not giving them free food: https://www.cnn.com/2021/06/16/asia/pakistan-police-detain-s...
Should the police have regulations about this sort of gift? Should, they probably do, and those that don't should.