Why did Hamlet pretend to be crazy?
Hamlet pretended to be crazy for several closely related reasons. He pretended to be crazy to have freedom to examine Claudius's guilt, to find a way to do what the Ghost asked, to make people think he was no threat, to distract attention from his investigation into his father's death, and so he could say outlandish things without striking a nerve.
How strange or odd soe'er I bear myself,
As I perchance hereafter shall think meet
To put an antic disposition on,
That you, at such times seeing me, never shall,
... by pronouncing of some doubtful phrase,
As 'Well, well, we know,' ...
Or such ambiguous giving out, to note
That you know aught of me: this not to do,
So grace and mercy at your most need help you, Swear. (I.v)
Hamlet pretends to be mad so he can uncover the truth about his father's death and what happened. However, in the process, he himself turns mad as his inward struggle of himself and trying to fit into societal norms drives him insane. His mother questions if he is sane when he is talking to the ghost in her room with her. He is ultimately the cause of his own downfall.
Initially, Hamlet feigns his insanity to distract Getrude and Claudius from his true intentions of exposing his uncle for the murder of his father. We know his is pretending to be crazy because he mentions it several times to Horatio.
"I am but mad north-north-west, when the wind is southerly I know a hawk from a handsaw"(Act 2 Scene 2 Lines 378-379).
Many people question whether his seeing his father's ghost was real or not and so that also factors in if he was pretending to be crazy or maybe he was crazy all along and his uncle never murdered his father. However, we know this is not true because Hamlet was not the only to see his fathers ghost.
Personally, I believe that Hamlet was genuinely pretending to be insane at the beginning. But after he contemplates suicide and the scene with Ophelia saying he loved her once, he drove himself to insanity. For example, when he saw his father's ghost in his mothers bedroom, Gertrude did not see him. I believe that to be a sign that Hamlet drove himself to insanity which ultimately leads to his downfall.