Yeah, you might think everyone would realize that there is no technical means to leave your unsupervised door unlocked on the internet. Unlike a physical door, if nobody comes to answer the internet door, it doesn't exist. However, it is impossible for everyone to understand everything.
With that said, the specific someone you refer I am sure has a valid point. When you knock on someone's door and nicely ask for a cup of sugar and whomever is answering the door happily gives it to you, it is reasonable to assume that is something you can take. They would say "no" otherwise.
I get it might be a friend that doesn't fully understand the boundaries of the homeowner answering the door, but it is unrealistic to place the onus on the neighbour looking for a cup of sugar to decide whether or not the occupant is acting in the interests of the homeowner. The fact that the person is already in the home to be able to answer the door implies that there is trust in that person to do right by the home.
By the same token, if the homeowner found out about the cup of sugar that they didn't want given away, most people would address it with the friend to see that it doesn't happen again, not go on a rampage with the neighbour. It is well understood that anyone within the home saying "yes" is to be considered authoritative. It is the only reasonable way.