As for why they did it, the answer is clear enough. It was the quickest and easiest way to end the civil war, allow the exiles to return, and restore the democracy. The oligarchs held the city, which was so strongly fortified that there was no real prospect of taking it by storm. The Spartans in the past had made a few half-hearted efforts, all easily repulsed, and ended up prevailing by blockade. Besides, the exiles did not want to damage the city if they could avoid it since it was, after all, their city. As for the Spartans, they had, after all, headed north to intervene on behalf of the oligarchs. They were willing to negotiate a settlement, but would probably intervene to prevent their allies from being defeated by force. And, one can well imagine, they might not have minded sacrificing 30 (or 51) of Lysander's creatures who certainly deserved it, but allowing whole-scale revenge against the entire aristocracy would be another matter altogether. According to the Second Century AD geographer Pausanias (no relation to the king), even that was enough to get King Pausanias put on trial before the Council and acquitted by a tie vote. It seems unlikely. No other source mentions such a trial and Xenophon makes clear that the settlement had the approval of the Ephors and Assembly in Sparta and was thus indisputably lawful.
But if fear of retaliation from Sparta explains why the Athenians initially agreed to the deal, it cannot explain why it held. It was not long before Sparta's power as dominant hegemon was being challenged, the Greek city-states were at war again, and Sparta's hand were more than full, leaving no time to intervene in Athens' internal affairs. If the Spartans get credit (or blame) for instituting the amnesty, to the Athenians goes credit (or blame) for sticking with it and achieving a genuine reconciliation that allowed the democracy to become stable, endure, and ultimately only succumb, not to internal strife, but to foreign conquest.
So, once again, that raises the question of whether the amnesty was the right thing to do. That is, after all, a very significant question to this day. In our own times, when dictators have been overthrown the question of how to deal with their past crimes has been one of the most controversial subjects around. To forgive and forget is to let serious crimes go unpunished. But to punish is to invite retaliation, and perhaps even an attempt to restore the dictatorship out of pure motives of fear and self-preservation. Fear and self-preservation were the main reasons the small citizen body held out as long as it did, and why settlement had to be negotiated by an outside power. Besides, one man, or thirty (or even 51), even when backed by a foreign garrison, cannot possibly rule all by themselves. They will necessarily have accomplices in the broader public. Attempts to bring all accomplices to justice can tear a country asunder and lead to endless revenge and recrimination between citizens.
The amnesty was clearly the right thing to do in at least one sense. It worked. The rival factions did reconcile and no further attempts were made to institute an oligarchy. It stands in remarkable contrast to Samos, where the democrats massacres some 200 oligarchs, exiled 400, and disenfranchised the rest, and later chose mass exile over whatever revenge the oligarchs might have in mind. It stands in remarkable contrast to Argos, where the popular party killed or expelled the oligarchs, and the oligarchs appealed to Sparta for aid. It stands in remarkable contrast to Corcyra, where democrats slaughtered oligarchs en masse, not even sparing the ones who took refuge in temples. The surviving oligarchs who escaped returned and burned their boats to prevent themselves from retreating, and pillaged the countryside. When the invading oligarchs were defeated, the Corcyrians slaughtered them to the last man. If the amnesty saved Athens such horrors, then the injustice of letting the oligarchy's crimes go unpunished seems a small price to pay!
Besides, its supporters were (presumably) a mixed bag. Xenophon describes the actions of the cavalry enough to give the distinct impression that he was one of the cavalry who took part, sometimes in immistakable crimes. Likewise, Plato was an initial supporter of the new government, whose leaders included some of his relatives, and "imagined that they would administer the State by leading it out of an unjust way of life into a just way." Young aristocrats like Xenophon and Plato had reason to be disillusioned with the democracy. They were too young to remember its glory days when it led the war against the Persians, liberated the Asian Greeks, and established voluntary defensive league.
What they saw, instead, was the government that massacred and enslaved the populations of Melos and Scione, that was talked into the reckless Sicilian expedition, that succumbed to such moral panic over the vandalism of the herms that no leading citizen was safe, that refused honorable offers of peace when the going was good, that sentenced six generals to death in a single vote after they had won a nearly miraculous victory, and that remained in deep denial even when it was obvious that all was lost. Such men might understandably believe, at first, that government by more "enlightened" men would offer a better rule, and might be unable to believe that a man as cultured and polished and Critias undoubtedly was could be an utter psychopath.
As has been all to often the case, no doubt they applauded when the Thirty executed men they regarded as vile demagogues, and rationalized when they moved on to more respectable prey, convinced themselves that some undoubtedly indefensible measures were temporary expedients and, after all, you can't make omelets without breaking eggs. By the time such rationalization became impossible to sustain, the 3000 were too mired in the Thirty's crimes to hope for any reconciliation with their fellow countrymen. The Thirty were eager to implicate as many as possible in their crimes. Many no doubt went along out of fear. Perhaps complicity was an initiation rite required for citizenship. Even some of the Thirty themselves capitulated to their colleagues out of fear. Most of the 3000 doubtless saw themselves as victims of the Thirty, compelled to share in their crimes without receiving any advantage.
It was a self-serving outlook, no doubt, that covered many a crime, and offered the usual excuse of "just following orders." But given the endless division, the bitter recrimination, and the possibility of civil war that might have followed any attempt to prosecute the accomplices of the Thirty, an amnesty was doubtless the least possible evil.
The amnesty does raise an interesting question. Besides Xenophon, our leading source of information about the Thirty is from speeches given afterward, sometimes to the Assembly, but mostly in lawsuits.* There were numerous suits in the years following the overthrow of the Thirty in which their actions became an issue, the most famous, of course, being the trial of Socrates. How could there be lawsuits about events under the Thirty if there was a general amnesty in place? In Athens, as ever since, people looked for loopholes and found a number. The most obvious was that the Thirty themselves were not exempt from trial. At least one (Eratosthenes) actually was tried (outcome unknown). Another was the argument that the amnesty was reached between the city and Piraeus, and that anyone implicated in the Thirty's crimes who nonetheless defected to Piraeus was not covered by the amnesty. (Assuming one wants to encourage defections, this sounds like very poor reasoning). Another was that supporters of the Thirty, though not subject to criminal penalties, could be excluded from certain offices, so someone seeking to disqualify a candidate might raise that issue. There were also private suits for defamation over an allegation that one collaborated with the Thirty. Or, most controversially, it could be used to create prejudice in a suit on an unrelated matter. In the case of Socrates, his real "crime" was almost certainly his association with Critias, but this was protected under the amnesty, so the accusers had to resort to vague charges of irreligion and corrupting the youth of Athens.
Finally, Thrasybulus, the leader of the democratic restoration, really deserves a few words. Aristotle pair aristocratic and popular politicians and names Theramenes as if he were just another conservative politician like Kimon or Nicias, both of whom were loyal to the democracy even if they did want some brakes on it. He even names Theramenes with Nicias as one of the "best" political leaders after those of early times, completely glossing over his role in twice overthrowing the democracy! As for popular politicians, he names Cleon and Cleophon as Theramenes' rivals and says, "From Cleon onward the leadership of the People was handed on in an unbroken line by the men most willing to play a bold part and to gratify the many with an eye to immediate popularity." He never so much as mentions Thrasybulus in his list of democratic leaders! He does briefly mention him as leading the exiles, but his main judgment is one of disapproval for his willingness to extent citizenship to extend citizenship to anyone taking part in the restoration, even slaves. He gives credit to Archinus for the reconciliation, but does not include him on the list of pairing politicians.
Others have been more generous in their assessment. Xenophon praises his tactical skill, his inspiring leadership, his piety, his patriotism, his forbearance in not stripping the dead because they were countrymen, and his role in reconciliation (without so much as mentioning Archinus). The geographer Pausanias says that his grave is first among all Athenians, even ahead of Pericles, and calls him, "in all respects the greatest of all famous Athenians, whether they lived before him or after him" for his role in overthrowing the Thirty and effecting a reconciliation afterward. The Roman biographer Cornelius Nepos says of Thrasybulus:
If merit is to be valued by itself, without regard to fortune, I doubt whether I ought not to place him first of all the Greek commanders. This I can say without hesitation, that I set no man above him in integrity, firmness, greatness of mind, and love for his country; for while many have wished, and few have been able, to deliver their country from one tyrant, it was his lot to restore his country, oppressed by thirty tyrants, from slavery to freedom. But though no man excelled him in these virtues, many, I know not how, surpassed him in fame.Plutarch did not write a Life of Thrasybulus, which is a shame, although it is hard to tell who he would have compared him to. Perhaps whoever restored the Roman Republic after the fall of Sulla? But that (as I understand it) was Pompey and Crassus, both of whom played a major part in its later and permanent downfall, through their own lust for power (and alliance with Caesar, of course). Thrasybulus was a different matter altogether. If anyone had the opportunity to establish himself as a left-wing populist dictator, championing the common people against the proven oppression of the oligarchs, it was Thrasybulus.** He even had the opportunity to emulate Pisistratus and establish himself on the benevolent wing of such rulers. But he made no such attempt, setting the democracy on a firm basis and willingly yielding place if other leaders proved more popular than he was. Wikipedia, at least, attributes his eclipse to being too ardent a democrat, not only in wanting to extend citizenship to everyone who fought at Piraeus, but also in wanting to restore pay for political office. (I have not found a source for that latter).
Be that as it may, the democracy in Athens did continue to flourish, did restore pay for offices, and even started offering pay for attending the Assembly. But at the same time, it managed to establish a much-needed brake on the democracy, without resorting to an aristocratic institution like the old Areopagus. This brake took the form of the graphe paranomon, roughly an allegation of unconstitutionality. Given that the last time the graphe paranomon was suspended, the 400 established their oligarchy, and the last time the Assembly ignored an allegation of graphe paranomon they sentenced six generals to death in a single vote and later came to regret it, this device must have been cherished much as we cherish appeals to constitutionality. Suit was before a jury of ordinary citizens, but in a more deliberative fashion than the assembly, and after hearing of the case. If a measure was found unconstitutional within a year of enactment, the law was rescinded and the author(s) penalized, usually by a fine. If it was found unconstitutional within five years, no penalty was imposed, but the measure became invalid. After five years, the measure was no longer available.
Democracy flourished in Athens thereafter until it succumbed to conquest by the Macedonians. But we are not there yet.
*With the caveat that these speeches invariably had an ax to grind and should not be taken as gospel truth.
**Except, perhaps, for the watchful presence of the Spartans. They may have been willing to tolerate the presence of a democracy, but probably not a left-wing populist dictator.