Wide hot subdwarf B (sdB) binaries with main-sequence companions are outcomes of stable mass transfer from evolved red giants. The orbits of these binaries show a strong correlation between their orbital periods and mass ratios. The origins of this correlation have, so far, been lacking a conclusive explanation. We aim to find a binary evolution model which can explain the observed correlation. Radii of evolved red giants, and hence the resulting orbital periods, strongly depend on their metallicity. We have performed a small but statistically significant binary population synthesis study with the binary stellar evolution code MESA. We have used a standard model for binary mass loss and a standard Galactic metallicity history. The resulting sdBs were selected based on the same criteria as used in observations and then compared with the observed population. We have achieved an excellent match to the observed period - mass ratio correlation without explicitly fine-tuning any parameters. Furthermore, our models produce a good match to the observed period - metallicity correlation. We predict several new correlations which link the observed sdB binaries to their progenitors, and a correlation between the period, metallicity and core mass for subdwarfs and young low-mass He white dwarfs. We also predict that sdB binaries have distinct orbital properties depending on whether they formed in the bulge, thin or thick disc, or the halo. We demonstrate, for the first time, how the metallicity history of the Milky Way is imprinted in the properties of the observed post-mass transfer binaries. We show that Galactic chemical evolution is an important factor in binary population studies of interacting systems containing at least one evolved low-mass (Mi < 1.6 Msol) component. Finally, we provide an observationally supported model of mass transfer from low-mass red giants onto main-sequence stars.