ORIGIN OF THE GALAXY MASS–METALLICITY–STAR FORMATION RELATION