I spent last week at Mini University, a grown-up summer camp (for nerds) at Indiana University. I took three classes each day, with topics ranging from Mars exploration to the future of book publishing.
One class focused on the cognitive science of theater. Why do we cry when Cordelia is hanged, when we know perfectly well that it's a performance? The answer, said professor Amy Cook, may be related to neurons in the brain called mirror neurons, which fire when we perform an action but also when we see it performed. So, seeing a play might trigger our own related experiences.
Cook compared this experience to Hamlet's staging of the play within the play; Hamlet says that "the purpose of playing ... was and is, to hold as 'twere the mirror up to nature." Shakespeare couldn't have known about mirror neurons, but he certainly understood the connection we feel to the experiences and characters on the stage.
For more on this topic, read Cook's essay, "Staging Nothing: Hamlet and Cognitive Science," originally published in SubStance and recently reprinted in Harold Bloom's Hamlet edition of the Modern Critical Interpretations series.