Randomization is the deliberate use of a chance mechanism — a random number sequence, a computer-generated list, or similar — to decide which treatment each enrolled participant receives. Its purpose is not fairness in a moral sense but comparability: it distributes every characteristic that could influence the outcome, whether or not the researchers thought to measure it, roughly evenly across the groups.
Consider a trial of a new drug for heart failure. Prognosis depends on age, ejection fraction, kidney function, diabetes, and a long list of factors clinicians recognize, plus others nobody has named. If we assign patients by any rule that correlates with prognosis — the day of the week they arrived, the ward they were admitted to, the clinician's judgment — the groups will differ systematically. Randomization breaks that correlation. Because assignment is independent of every patient characteristic, the expected difference between groups in any prognostic factor is zero, and the actual difference shrinks as the sample grows.
This is what makes the groups exchangeable: if we swapped the labels of the two arms, the results should be statistically indistinguishable. Exchangeability is the property that licenses the simple comparison of outcomes between arms. It is also why randomization addresses confounding — a confounder is a factor associated with both treatment and outcome, and randomization removes the association with treatment by construction. Observational designs can adjust for measured confounders, but only randomization handles the unmeasured ones.