Some of the details aren't clear, but this much seems clear: if you tune a particular chord, you can get it well tuned and it sounds good.
You didn't say what chord you tune to, or what the other chords are that sound bad in comparison.
But I imagine you might tune to an open
C major and get it sounding nice, then play an open
A major and it sounds badly out of tune.
My understanding of this is mostly practical. When you get two strings tuned nicely to some interval and then play another interval with those same two strings the second interval can sound out of tune. To me it's most noticeable when I tune a perfect fifth between open
x3x0xx and then play the octave
x0x2xx and the octave sounds out of tune.
I don't know all the math of tuning behind this, but I understand it is just one of many tuning "problems". It's like the problem of 12 perfect fifths don't add up to seven octaves. Not perfectly. Not if
P5 is the ratio
2:1. When one interval is perfect you can't always divide it up into some other perfect or just interval.
The solution is to compromise in some way. Equal temperament is the modern tuning compromise. On the guitar I usually work through all five open chords and tweak them until they all sound good. The most noticeable difference to be is between the
E A D chords where the voicing is all octaves, fifths, and fourths in the lower voices and the
G C chords where the voicing is close with thirds in the lower voices. Compromising the tuning for open
C is my main focus. Then I follow up with tweaking open
D. I think I misjudge the high strings for some reason and open
D helps me get them sorted out.
Also, a lot of this depends on the proper placement of the frets and position of the bridge(s.) People refer to that as the guitar's intonation. If the guitar isn't good quality re. fret placement, neck alignment, etc. or if the bridges are poorly set up, it can be practically impossible to get it decently tuned.