I just have to point out: thalidomide is still prescribed as a drug for cancer and is very effective.
But yes, it was very effective as a treatment. When it was approved for cancer use, we actually had no idea how it worked, only that it worked really well. Thalidomide has saved a few orders of magnitude more lives than it took/damaged.