The origin of the galaxy size–stellar metallicity relation – I. A semi-analytical perspective | Synapse