The US Food and Drug Administration has an exhaustive process, “to evaluate new drugs before they can be sold.” Specifically, this involves the Center for Drug Evaluation and Research (CDER). The rationale is sound and for the general good:
The center’s best-known job is to evaluate new drugs before they can be sold. CDER’s evaluation not only prevents quackery, but also provides doctors and patients the information they need to use medicines wisely. The center ensures that drugs, both brand-name and generic, work correctly and that their health benefits outweigh their known risks.
Note the goal is neither absolute safety nor perfect efficacy. In other words, no drug is completely safe and without side effects, nor will a drug work every time, exactly as it was designed to. The key is the risk-benefit ratio, where the benefits outweigh the risks or costs.
Otherwise, air travel, driving, and walking would be prohibited as these activities all involve some risk — but that is far outweighed by their benefits.
Drugs are approved for a specific indication, at a particular dose, and this is on the product label, which is actually the multiple folded paper, attached to the medication container with print so small no one can or wants to read it. It summarizes indications, clinical trial results, side effects, warnings, and dosages, all determined by the registration trials leading to FDA review and approval.