Shakespeare evidently wanted to illustrate and dramatize the fact that Claudius was very seriously intent on spying on his nephew Hamlet. It must have seemed obvious to Claudius that Hamlet would have a strong resentment about being cheated out of the crown that was rightfully his. If so, it was logical that Hamlet could be plotting to displace Claudius just as Claudius had displaced Hamlet's father. Claudius feels insecure because he knows he doesn't deserve to be king. He wouldn't deserve it even if his brother had died a natural death. But he got the crown by murdering his brother. Claudius feels guilty. He must know that his crime was less than a perfect one. What are the chances of a man being bitten by a poisonous snake while sleeping in his garden? Are there any poisonous snakes in Denmark? Hamlet, as his uncle is well aware, is an exceptionally intelligent and highly educated young man. Hamlet could suspect that Claudius killed his father, and that may be one of the things he seems to be constantly brooding on.
So far, Claudius only has one person to spy on Hamlet. That is Polonius, who may think he is crafty but is too obvious and too ineffectual with all his prying. Claudius sends for Rosencrantz and Guildenstern solely for the purpose of getting them to do more spying for him. He hopes that because they are old friends they will be able to get Hamlet to reveal some of his secret thoughts, which the toadies can report back to him. Claudius reveals his motives for sending for Rosencrantz and Guildenstern when they first appear in Act II, Scene 2. By this time the audience know that Claudius is a murderer and a villain and can understand the truth behind his cunning circumlocution.
Something have you heard
Of Hamlet's transformation—so call it,
Sith nor the exterior nor the inward man
Resembles that it was. What it should be,
More than his father's death, that thus hath put him
So much from the understanding of himself,
I cannot dream of. I entreat you both
That, being of so young days brought up with him,
And sith so neighbour'd to his youth and haviour,
That you vouchsafe your rest here in our court
Some little time; so by your companies
To draw him on to pleasures, and to gather
So much as from occasion you may glean,
Whether aught to us unknown afflicts him thus
That open'd lies within our remedy.
There are other reasons why Shakespeare introduces the two characters who are so similar they seem like twins.
- Drama relies on dialogue. Rosencrantz and Guildenstern give Hamlet two more people to talk to. Hamlet does confide in them to a limited extent.
- Since there are two of them, they are potentially able to overpower Hamlet when he seems to be getting violent. After he kills Polonius, the two men become like guards or custodians. They bring him to Claudius, and they accompany him on the ship heading for England. They never use force, but it is understood that he is pretty much their prisoner. If there were only one of them, the effect would not be the same. Hamlet might overpower one if he wanted to do so; but he is intentionally outnumbered two-to-one.