The side-effects of any medication need to be weighed against the cost of the underlying medical condition going untreated. Sometimes that cost-benefit calculation works out in favor of the meds even when the side-effects are severe.
(Also worth noting that side-effects and effective doses are something clinical trials aim to establish. That gives you the data to make those kinds of cost-benefit decisions, which you can’t do with illegal drugs. So it’s not the same.)