There are several reason why Shakespeare would choose to prolong the confrontation between Hamlet and his Uncle. First, from the author's point of view, delaying the confrontation heightens the suspense of the play. Secondly, it allows for the tension to increase which brings about more characterization to come through. Motives, inner desires, fears....all come to the surface when under pressure.
The dramatic advantages, of course, of delaying the inevitable, is to make it plausible, and to give the audience time to believe in the protagonist and desire for an ending to happen. It also increases their shock and horror (catharsis) when the confrontation does finally arrive.