In Paradise Lost, why does God allow Satan to leave hell?
Milton first offers a partial explanation, saying that hell isn't powerful enough to hold Satan:
No bounds / prescribed, No bars of hell nor all the chains / Heaped on him there . . . can hold [him] . . .
This, however, is more Satan's perspective than God's, a description of his will to ultimate power, his pride and overestimation of himself, and his complete unwllingness to bow to any other force than himself.
We knows this because Milton then fleshes out this earlier explanation to show that it is God's will, not Satan's, that Satan roam the earth. Milton says it is with God's permission that Satan is set free. God sets Satan free for two reasons: first, because by trying to do evil, Satan will make himself more and more deserving of eternal punishment: he will "heap on himself damnation." Second, it will enrage Satan that his attempts at evil will be met with and overpowered by the Son of God, Jesus, who will "bring forth / Infinite goodness, grace and mercy." (This passage doesn't name Jesus, but that is what Milton means by "infinite goodness, grace and mercy.") People will turn from Satan towards the good and Satan will essentially implode with overwhelming rage because he will see that he is ineffective. Satan can't bear the thought of being powerless. But like it or not, instead of hurting others, the "confusion, wrath and vengeance" he tries to sow among humans will boomerang back to him.
The passage explaining this is below:
So stretched out huge in length the Arch-Fiend lay,
Chained on the burning lake; nor ever thence
Had risen, or heaved his head, but that the will
And high permission of all-ruling Heaven
Left him at large to his own dark designs,
That with reiterated crimes he might
Heap on himself damnation, while he sought
Evil to others, and enraged might see
How all his malice served but to bring forth
Infinite goodness, grace, and mercy, shewn
On Man by him seduced, but on himself
Treble confusion, wrath, and vengeance poured.