We analytically derive the observed size–mass relation of galaxies’ atomic hydrogen (H I), including limits on its scatter, based on simple assumptions about the structure of H I discs. We trial three generic profiles for H I surface density as a function of radius. First, we assert that H I surface densities saturate at a variable threshold, and otherwise fall off exponentially with radius or, secondly, radius squared. Our third model assumes the total gas surface density is exponential, with the H I fraction at each radius depending on local pressure. These are tested against a compilation of 110 galaxies from the THINGS, LITTLE THINGS, LVHIS, and Bluedisk surveys, whose H I surface density profiles are well resolved. All models fit the observations well and predict consistent size–mass relations. Using an analytical argument, we explain why processes that cause gas disc truncation – such as ram-pressure stripping – scarcely affect the H I size–mass relation. This is tested with the IllustrisTNG(100) cosmological, hydrodynamic simulation and the DARK SAGE semi-analytic model of galaxy formation, both of which capture radially resolved disc structure. For galaxies with m∗ ≥ 109 M and mH I ≥ 108 M, both simulations predict H I size–mass relations that align with observations, show no difference between central and satellite galaxies, and show only a minor, second-order dependence on host halo mass for satellites. Ultimately, the universally tight H I size–mass relation is mathematically inevitable and robust. Only by completely disrupting the structure of H I discs, e.g. through overly powerful feedback, could a simulation predict the relation poorly.