On The Big Bang Theory, Sheldon Cooper (Jim Parsons) always knocks three times before entering a room. It was always assumed this was an obsessive tic the rigid scientist needed to do in order to feel in control of his environment.

But in Monday's episode, "The Hot Tub Contamination," Sheldon revealed the real reason, and it comes less from a disorder and more from childhood trauma.

While eating ice cream with Penny (Kaley Cuoco), Sheldon tells a story to explain why it's so hard for him to be emotionally and physically intimate with Amy (Mayim Bialik).

When he was 13, he came home early for spring break from college and heard sounds coming from his parents' bedroom. He opened the door and saw his father having sex with another woman. Since then, he has always knocked three times before entering a room because one is traditional, but "two and three are for people to get their pants on," which is actually uncommonly considerate behavior from Sheldon. He and his father never spoke of the incident.

Jim Parsons and Kaley Cuoco, <em>The Big Bang Theory</em>Jim Parsons and Kaley Cuoco, The Big Bang Theory

Sheldon tells Penny that since he and Amy have been living together, they've been bickering like his parents used to. Sheldon is afraid that he will do something like what his dad did and break Amy's heart, and he wants to set her up for disappointment early so she does't get hurt in the future. That's why he's been treating her badly by being hypercritical and combative and saying he wants to sleep with other people.

It's mostly played for laughs in the episode, but this anecdote explains a lot about why Sheldon is the way he is. The poor guy didn't choose to be so difficult — his parents made him that way. He's a sad kid in a tall nerd's body. Has Sheldon ever gone to therapy on the show? Seems like something that should happen.

In any case, Penny helped him realize that he has to live with Amy now, not break up with her in some hypothetical future. The "happily ever after" found Amy and Sheldon putting their toothbrushes in the same holder, and the cohabitation experimentation continued for another week.

The Big Bang Theory moves to its regular time Thursdays at 8/7c starting Oct. 27 on CBS.

(Full disclosure: TVGuide.com is owned by CBS.)