  Using large-scale hydrodynamic simulations with heuristic criteria for galaxy
formation, we investigate how the galaxy field is related to the mass density
and the gas temperature. We find that the bias b(R) = sigma_g(R)/sigma(R),
where sigma_g(R) is the variance of galaxy counts in spheres of radius R and
sigma(R) is the same for mass, varies from 2.6 at 1 h^{-1} Mpc to 1.2 at 30
h^{-1} Mpc. Including the dependence of the galaxy density on local gas
temperature as well as on local mass density can fully account for this scale
dependence. Galaxy density depends on temperature because gas which is too hot
cannot cool to form galaxies; this causes scale dependence of b(R) because
local gas temperature is related to the gravitational potential, and thus
contains information about the large scale density field. We show that
temperature dependence generally causes b(R) to vary on quasilinear and
nonlinear scales, indicating that scale dependence of bias may be a generic
effect in realistic galaxy formation scenarios. We find that the relationship
between the galaxy and mass density fields is also a function of galaxy age. On
large scales, the older galaxies are highly biased (b ~ 1.7) and highly
correlated (r ~ 1.0) with the mass density field; younger galaxies are not
biased (b ~ 0.8) and are poorly correlated (r ~ 0.5) with the mass. We argue
that linear bias is inadequate to describe the relationship between galaxies
and mass. (Abridged)
