Prospero forbids Miranda from telling Ferdinand her name for two reasons:
- To keep Miranda's identity and his own secret so that his plan is not revealed prematurely.
- To strengthen Ferdinand and Miranda's love by making them overcome some adversity.
First, Prospero's plot is to regain the dukedom of Milan from his usurping brother Antonio. The king of Naples, Alonso, had helped Antonio oust Prospero. Ferdinand is Alonso's son. So if Ferdinand and Miranda marry, Alonso will become Prospero's ally rather than Antonio's. But if Miranda tells Ferdinand her name, there is a possibility he may recognize the name and understand who Prospero really is. That would expose his plans before they come to fruition.
Second, when Ferdinand, separated from the rest of his shipmates, meets Miranda for the first time, the two fall in love just as Prospero wants. However, Prospero is worried that if their love is too easy, then they will not value it enough:
They are both in either’s powers. But this swift business
I must uneasy make, lest too light winning
Make the prize light. (I.ii.543–545)
He wants their love to overcome some difficulties so that they will not take it for granted. He treats Ferdinand harshly so that Miranda will pity him and thereby love him more. That is the other reason why he forbids Miranda from telling Ferdinand her name: to put difficulties in their love and strengthen it withal.