I see TurtleDove and Scuba_Dog's point. It does make it easier to understand what might have happened.
Easier to understand, perhaps. But Robert is still entirely in the wrong. Sadly, what I'm reading in TD's and other similar posts sounds like an attempt to absolve Robert because the situation was somehow out of the norm. Janet could have brought the cake in with flashing lights and announced its delivery with a bull horn and Robert would still be wrong.
Janet: Not wrong in any way, shape or form.
Robert: Entirely wrong.
And to me, it doesn't even matter how wrong Robert is. If I wanted to say something to Robert, or decided not to invite him to a party again, or I don't know, press charges for stealing cheesecake, it would be one thing. I think it's totally fine to think "maybe Robert took it innocently."
But, to say that Janet shouldn't have brought the cake (or it was strange to), or that I should have just put it out to begin with, or even that somehow my DH was lying (which is absurd) is just crazy.
I know a lot of people have weird hang ups about food that I don't understand. But, I have never attended a party where I paid too much attention to what guests handed the hosts when they walk through the door, and I certainly never go rummaging through their kitchen looking for food that wasn't put out. And even if I notice that someone brings food (or any gift) to host, I still don't jump to the conclusion that it must be for me too...and that if the host didn't put it out with everything else, I have some right/obligation to go find it.
But, even saying all that...it doesn't matter. Because Robert's part is over. Until he somehow ends up at my house again and does something like this again, it just doesn't matter. What does matter is Janet. And she is not wrong, strange, weird, or odd in any way to give me a gift that I absolutely love for any reason or in any setting.