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.