  In star-forming galaxies, the far-infrared (FIR) and radio-continuum
luminosities obey a tight empirical relation over a large range of
star-formation rates (SFR). We examine magneto-hydrodynamic galaxy simulations
with cosmic rays (CRs), accounting for their advective and anisotropic
diffusive transport. We show that gravitational collapse of the proto-galaxy
generates a corrugated accretion shock, which injects turbulence and drives a
small-scale magnetic dynamo. As the shock propagates outwards and the
associated turbulence decays, the large velocity shear between the
supersonically rotating cool disc with respect to the (partially)
pressure-supported hot circumgalactic medium excites Kelvin-Helmholtz surface
and body modes. Those inject turbulence and drive multiple small-scale dynamos,
which exponentially amplify magnetic fields. They grow in scale to reach
equipartition with thermal and CR energies in Milky Way-mass galaxies. In small
galaxies, the magnetic energy saturates at the turbulent energy while it fails
to reach equipartition with thermal and CR energies. We solve for steady-state
spectra of CR protons, secondary electrons/positrons from hadronic CR-proton
interactions with the interstellar medium, and primary shock-accelerated
electrons at supernovae. The radio-synchrotron emission is dominated by primary
electrons, irradiates the magnetised disc, bulge, and bubble-shaped
magnetically-loaded outflows of our simulated Milky Way-mass galaxy. Our
star-forming and star-bursting galaxies with saturated magnetic fields match
the global FIR-radio correlation (FRC) across four orders of magnitude. Its
intrinsic scatter arises due to (i) different magnetic saturation levels that
result from different seed magnetic fields, (ii) different radio synchrotron
luminosities for different specific SFRs at fixed SFR and (iii) a varying radio
intensity with galactic inclination. (abridged)
