This has happened in different occasions. If there’s a container close to the wall when you’re on the opposite side, you can loot it. If the owner is looting it already and you try to loot it, your looting window will close upon opening the window. The owner figured out that someone was looting their container and moved/removed it, lol. I was able to take two items before they moved/removed the container.
Edit: From now on, I will post in the Bug forum. Sorry about that.