Prospero is a fairly mysterious character, and his most mysterious moment occurs in Act 4 Scene 1 when he delivers a unprompted philosophical soliloquy to Ferdinand and Miranda about the nature of life: “We are such stuff/As dreams are made on, and our little life/Is rounded with a sleep” (4.1 156-158). It is difficult to know exactly what to make of this speech initially. At first glance, we might assume that Prospero is reflecting upon the insignificance of individual lives in the grand scheme of things. Saying that the entire world will eventually dissolve into nothingness does seem indicative of a rather fatalistic perspective. Furthermore, the characters of The Tempest see a great many occurrences which had previously seemed to them utterly impossible, indicating their massive naiveté in regards to the mysterious workings of the universe. While such a pessimistic discourse might seem somewhat out of place in this particular narrative, it is not impossible to envision Prospero might have adopted such a cynical outlook after all the hardships he has endured.
While such a reading is probably accurate to some small extent, we might also view Prospero’s speech as one of the few illuminations of his motivations in the play. We know Prospero’s general background – how his lack of interest in politics led to his exile – and in his interactions with Miranda, Caliban, and Ariel, we see his desperate need for control over those around him (a trait which he surely adopted as a result of his difficult experiences over the past twelve years). We also see his elaborate plan executed step-by-step, but his reasoning behind all of these actions is somewhat vague. We know that he wants revenge, but why does he not simply kill those who betrayed him like other Shakespeare protagonists (Hamlet or Othello, for example) likely would? Why does he, given his overbearing tendencies, make finding a husband for Miranda such a large part of his plan? All things considered, his grand scheme is fairly benevolent for a character who is presented in somewhat harsh terms (particularly in his treatment of Caliban and Ariel) in other parts of the play.
The speech he gives to Ferdinand and Miranda, then, is an explanation for his seemingly out of character actions. After a laborious twelve years in which he was betrayed by people close to him and forced to live in isolation, we would expect him to be angry and entirely focused on bloody vengeance. Instead, his struggles have merely left him tired: “Sir, I am vexed./Bear with my weakness. My old brain is troubled./Be not disturbed with my infirmity” (4.1 158-160). His soliloquy is a recognition of the fact that life is fleeting, and while he does demand a certain amount of penance for his sufferings, he ultimately chooses to prioritize finding peace for himself and those around him. His forgiveness of his betrayers and pairing of Ferdinand and Miranda makes much more sense when viewed in that light. Whereas many Shakespeare plays are defined by one act of violence begetting further ones, The Tempest is ultimately defined by the central character rejecting that vicious cycle and choosing harmony instead.