Two things moving together does not mean one causes the other. Ice cream sales and drowning deaths both rise in summer — but ice cream doesn't cause drowning; a third factor, hot weather, drives both. This is a confounding variable, and mistaking correlation for causation is one of the most common and consequential reasoning errors, from health headlines to policy debates.
There are three innocent explanations for any correlation besides direct causation: a hidden common cause (the ice cream case), reverse causation (maybe B causes A, not A causes B), or pure coincidence (with enough data, unrelated things will correlate by chance). This is why the gold standard for establishing cause is the randomized controlled trial: by randomly assigning who gets a treatment, it breaks the link between the treatment and any confounding factor, so a difference in outcomes can be attributed to the treatment itself.
The statistician Ronald Fisher formalized randomization in the 1930s precisely to defeat confounding: if you randomly decide who gets a treatment, no hidden factor can systematically differ between the groups, so any outcome difference is attributable to the treatment. Ironically, Fisher himself later resisted the conclusion that smoking causes lung cancer, arguing the correlation might be confounded — perhaps a genetic tendency caused both the smoking and the cancer. Resolving that debate took the careful work of Richard Doll and Austin Bradford Hill, whose studies and the resulting 'Bradford Hill criteria' (strength, consistency, dose-response, and more) laid out how to argue for causation from observational data when a randomized trial is impossible. The episode shows both the danger of confounding and how science eventually works around it.