It reminds the audience that the government of Denmark is rotten and corrupt.
Explanation:
William Shakespeare's tragedy play "Hamlet" revolves around the revenge taken by a young prince for the murder of his father. Hamlet, assisted by the ghost of his dead father King Hamlet, he exacts revenge on his uncle and murderer, the current King of Denmark Claudius.
The excerpt in the question is taken from Act III scene iv where Hamlet confronts his mother, Queen Gertrude about her actions about the whole situation. Hamlet accuses her of 'rotting from the inside' even though she may have acted like she really cared for him or even about her dead husband, she is the same just like her new husband King Claudius. Using the motif of decay and rot in his speech, Hamlet is also referring to the rotten and corrupt state of the government of Denmark.