More than Shakespeare's other tragedies, Hamlet and King Lear focus on the irrational side of human nature and on man as helpless before intangible forces that cannot be confronted and dealt with directly. This is also partly true of Macbeth which was written later and is a kind of compressed and faster-moving drama based on themes similar to those of Lear and Hamlet.
It is interesting that the two literary men who were probably the most negative critics of Shakespeare—Leo Tolstoy and T.S. Eliot—focused their criticisms specifically on King Lear and Hamlet, respectively. In both cases, the accusation was that the two plays either did not make dramatic sense, or that there were inconsistencies and flaws in the way the main characters were depicted. But in my view, it is precisely Shakespeare's depiction of the irrational side of both people and life in general that accounts for the greatness of these dramas. Lear is beset by forces he cannot understand or deal with. Cordelia's lack of excessive praise of him, though she's the only one of the three daughters who loves him, causes Lear to overreact, and this propels the whole tragedy. Other elements of the play are initially mystifying, and almost seem to anticipate the absurdist theatre of 350 years after Shakespeare's age. But the reader and audience respond to these things—not only Lear's irrational behavior but the psychotic evil of Edmund—because they express a darkness at the center of human experience. Similarly, Hamlet's inconsistent and chaotic personality is emblematic of a quality one reflexively senses is "true to life" and which fascinates us as a more "realistic" character would not.
I would mention as well that the plots of both works have a universality about them, seemingly incorporating diverse and contradictory elements, that is realistic on a higher level than a more straightforward series of actions would be. Precisely because it is difficult to "explain" why events occur as they do in King Lear and Hamlet, the two plays reveal a dark, primal mystery about humanity, and are a cut above Shakespeare's other tragedies, as great as those nevertheless are.