For example, if you are on the fifth in the chord, you adjust the tone slightly up. If you are on the major third, slightly down. Minor third, slightly up. These rules are consciously applied by choral singers, and are even genre-defining for things like barbershop.
on a more fundamental level our perception of pitch (the musical psychoacoustic thing) also vary with loudness and frequency (physical reality)...
add to that, that at low frequencies we have difficulties tracking the pitch in the first place (so we rely on overtones/harmonics) -- which makes it even more important to tune on evertone (because our heads can recreate/track the note through psychoacoustic effects... so we will ear it "nice" when without the overtones we would be lost)
funny extra fact, our ears are cavities with resonances and distortions... (some musicians exploit that https://en.wikipedia.org/wiki/Maryanne_Amacher )
i might be wrong on some points since i starting learning about music 2 years ago as a hobby but i think it is mostly correct. the whole thing is fascinating.
apparently it's often done in pro recorded music.
my peterson tuner actually has these tunings embedded inside.