My shrink pointed out in a conversation once as a tangent that Hamlet was not-so-subtly a psychoanalytic masterpiece: Hamlet watches his uncle carry out the Oedipal fantasy of killing his father and marrying his mother, and is haunted by a "ghost" to take action. It is not Shakespeare's only play to feature historical fiction or political machination by a long shot, so one should probe for other reasons to explain why it's proved so enduringly popular.