  We study the impact that large-scale perturbations of (i) the matter density
and (ii) the primordial gravitational potential with local primordial
non-Gaussianity (PNG) have on galaxy formation using the IllustrisTNG model. We
focus on the linear galaxy bias $b_1$ and the coefficient $b_\phi$ of the
scale-dependent bias induced by PNG, which describe the response of galaxy
number counts to these two types of perturbations, respectively. We perform our
study using separate universe simulations, in which the effect of the
perturbations is mimicked by changes to the cosmological parameters: modified
cosmic matter density for $b_1$ and modified amplitude $\mathcal{A}_s$ of the
primordial scalar power spectrum for $b_\phi$. We find that the widely used
universality relation $b_\phi = 2\delta_c(b_1 - 1)$ is a poor description of
the bias of haloes and galaxies selected by stellar mass $M_*$, which is
instead described better by $b_\phi(M_*) = 2\delta_c(b_1(M_*) - p)$ with $p \in
[0.4, 0.7]$. This is explained by the different impact that matter
overdensities and local PNG have on the median stellar-to-halo-mass relation. A
simple model of this impact allows us to describe the stellar mass dependence
of $b_1$ and $b_\phi$ fairly well. Our results also show a nontrivial relation
between $b_1$ and $b_\phi$ for galaxies selected by color and black hole mass
accretion rate. Our results provide refined priors on $b_\phi$ for local PNG
constraints and forecasts using galaxy clustering. Given that the widely used
universality relation underpredicts $b_\phi(M_*)$, existing analyses may
underestimate the true constraining power on local PNG.
