There are certain rules of etiquette by which one must abide. It’s not so simple, because there is no universal handbook for these situations. There is just a codified set of rules that you have to intuitively pick up over the course of your life. Maybe your parents teach them to you, or maybe you just collect them over the course of your life. Either way, it’s important that you follow them, lest you never be invited to anyone’s house ever again.
One of the biggest rules is to leave everything how you found it, if not a little better. You bring a host gift that your generous benefactors can enjoy, and you try not to take anything. Maybe they’ve invited you to partake in some of their snacks or drinks, and that’s not impolite to take advantage of. But you don’t take more than your share. You certainly don’t empty out the whole entire pantry. Because that would be stealing, right? Apparently not to the man in this story, who saw an opportunity for free food and took it immediately.