Pharmaceutical companies are required by law in most countries to perform clinical trials, testing new drugs on people before they are made generally available.
The variables in a clinical trial are specified and controlled, but a clinical trial can never tell you the whole story of the effects of a drug in all situations.