In Hamlet, what is Hamlet trying to do in his confrontion with his mother? Why are there two side to this story?
A fine question. Hamlet is indeed doing more than one thing in this scene, as is Shakespeare. On one hand, Hamlet is simply venting his pain over his loss of his father. That's the bitter rage you see. On the other, he's trying to investigate his mother's involvement. Did she play an active part in killing Hamlet's father, about whom he says, "every god did seem to set his seal / To give the world assurance of a man”?
Now, Shakespeare is also doing more than one thing. He's raising the dramatic stakes in the play, he's advancing the plot (killing Polonius will establish Hamlet's madness further, unbalance Ophelia, etc.)
As to why, Hamlet is a profoundly divided man. He always does more than one thing—sometimes waffling, sometimes intentionally.