One way for Sheldon to "misinterpret" the situation is for George and Mary to have already separated but they were trying not to tell the children.
I don't know the exact episode, but he tells Penny the story to explain why he always knocks three times. Might have been the episode where they do they love experiment.
Edit: whoops, thought I was at the end of the thread. Already answered!