Another thing that’s not been mentioned here: there is a relationship between volume and pitch. In short, you strike a string hard and it goes a bit sharp. The issue is that the tonal math makes a linearization of the string physics, but the highly activated string is effectively a little tighter than the idealized version.
Humans are also not perfect at fretting with the exact same pressure every time, or without inducing some bend in the strings. This is really noticeable with the G string which always sounds out of tune while playing, because our tuning system gives it a half-step-down intonation as a trade-off to make it easier to form chords.
James Taylor compensates by tuning everything down a few cents, between -12 at the low E and -3 at the high E, with a little break in the pattern with -4 cents at the G to deal with its weirdness. Good electronic tuners have "sweetened" presets which do something similar.