I don't think anyone has enough experience with this rare sort of situation to say with confidence how best to handle it. A lot of it depends on the details. For example, how much time elapsed before the mistake was noticed? Correcting the error a few days later might not be so bad, while a few months later would be crazy. How close to being admitted had the student been? There's a big difference between someone who narrowly missed being legitimately admitted and someone who is manifestly unqualified.
I'd recommend against getting lawyers involved except in extraordinary circumstances. The problem is that the culture of academia is based on reputation and trust, and this culture does not mesh well with the legal system. If a student manages to gain admission to an unwilling department by legal threats, that fact alone will outweigh all other aspects of the student's reputation for many years to come. (For example, hiring committees will wonder what else this person might decide to threaten legal action over or in what others ways they might prove disagreeable as a colleague.) And there's no way to keep it secret: it will be one of the most interesting pieces of gossip in years, and enough people from the admissions committee will know what happened that someone is sure to leak the news more broadly.
For comparison, I've seen a couple of people ruin their reputations by litigating tenure cases, so that this fact is what they are best known for by far. It's really not a good outcome. That might be worthwhile if the prize is tenure, but it's certainly not worthwhile for admission to graduate school (no matter which school).
It's still reasonable to make an argument for why they should honor the acceptance and to explain the hardship that rescinding it would cause. However, it's important not to exaggerate the difficulties. For example, in my experience with graduate admissions it's rare for students to take irreversible steps immediately upon receiving an acceptance (for example, withdrawing/declining at all other schools). If someone told me they turned down all other options the same day they received a mistaken offer, I'd be a little skeptical, and I'd at least expect them to recognize that this was unusual and explain further. Of course the longer the mistake went uncorrected, the greater one would expect the hardship to be.
If attempts to convince the school to honor the acceptance fail, then the least one could expect them to do is to help fix any problems they caused. For example, to get in touch with any other schools the applicant turned down, explain that the error was entirely theirs, and help try to convince the other schools to reinstate the applications/offers. (The reason is that if a student says they had an offer from X but it turned out to be a mistake on X's part, many people will assume the student misinterpreted something rather than that X genuinely misled them.) Of course this isn't guaranteed to fix everything, but I expect some maneuvering behind the scenes could at least help.