@TetraSky these kind of law existed in a lot of country in medieval time, it was made so all the food would be put under the lord's care and distributed equally to all, but a little more equally for the soldier. It was made for when the city was under siege.
I don't know what these guards are expecting, but bad things tend to happen when one is outnumbered and is threatening to take food away from something starving. I'd probably tie all of them to trees so they can suffer from the feeling of being hungry, but they are probably going to be put on the bullet train to pound town.