Given the thalidomide birth defect disaster of the 1960s, why was it later approved by the U.S. FDA for treatment of leprosy (1996) and of multiple myeloma (2006)? Presumably, the teratogenic issues and problems with permanent nerve damage didn't go away, as the liver can convert the "good" enantiomer to the "bad." Thalidomide affects even non-pregnant women, so why approve a drug with known severe complications?
Because leprosy and multiple myeloma are conditions for which other treatment options are limited.
All treatments have side effects, some more debilitating than others. The trick with pharmacology is to balance the benefit of treatment with the hazards of the side effects.
Take cancer chemotherapy. The drugs we use for cancer chemotherapy are horrible poisons. We literally use derivatives of chemical weapons to treat cancer. Why do we deliberately poison cancer patients with what amounts to a weapon of mass destruction? Because if we don't, the cancer will kill them.
In pharmacology there's a concept of a therapeutic window. That is, there's a particular amount of compound that will cause death or other severe disability. There's another (hopefully lower) level of the compound that will effectively treat the disease. In treating, we hope to hit that middle ground: enough to treat the disease, but not enough to kill the patient.
Different drugs have different therapeutic window. The window for over-the-counter drugs like asprin is rather large: the amount needed for severe side effects is many times higher than what people take to treat headaches. That's why we can allow untrained people to self-dose. (Though look at acetaminophen/paracetamol as an over-the-counter example where the window is not as large as it probably should be.)
In contrast, the threaputic window for many chemotherapy drugs is rather narrow. To make sure we hit that window, they're typically dosed by licensed professionals in a very controlled environment.
Back to thalidomide. The side effects of thalidomide are pretty severe. But to some extent they're controllable. If you scrupulously avoid exposing pregnant women or women who may become pregnant to thalidomide, you can avoid the teratogenic consequences. For the other consequences, you're back to the theraputic window: you want to hit a level of drug that is effective in treating the disease, but minimizes side effects.
That's why thalidomide has been approved. It's a cost/benefit analysis. The approving authorities took a look at the hazards of leaving leprosy and multiple myeloma untreated (or treated with other methods) versus the hazards from exposure to thalidomide. On the whole, they felt that the risks of thalidomide could be mitigated enough that it was the "lesser evil" than leaving the diseases untreated.
That said, if someone came out with a wonder drug that was as effective as thalidomide in treating these diseases but had fewer (or more benign) side effects, doctors would drop thalidomide like a hot potato, and the FDA might even revoke its approval. (Similar arguments hold for other potentially hazardous drugs like the nitrogen mustard chemotherapeutics.)
Thalidomide is used to treat, among other things, multiple myeloma. Since we know it has adverse effects for pregnant women, we simply don't give it to them.
Almost all drugs have side effects of some kind. We don't ban aspirin or NSAIDS, even though those are all known to have issues with stomach bleeding, for example.