There is a certain sense of justice in this event. Remember that it is the sword of Laertes that carries the venom with which Laertes hopes to gain his revenge. Hamlet's sword does not carry any poison, so by engineering the exchange of weapons during the duel, Shakespeare allows Laertes to be hoist by his own petard, or killed by his own treachery. Hamlet unknowingly kills Laertes just as he is unknowingly killed when Laertes draws blood on him. Laertes recognises the justice of what happens:
Why as a woodcock to mine own spring, Osric,
I am justly kill'd with mine own treachery.
He later on describes the plot to Hamlet and how "the foul practice / Hath turn'd itself on me." Note how this prompts serious self-reflection on the part of Laertes and the awareness that both he and Hamlet have been tricked by the King, Claudius. Thus Hamlet delivers justice in the form of killing Claudius.