I think you may be right that's it's less a legal issue than a self-policing issue.
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...