With an ordinary fretted guitar, you can sort of perfectly tune it to what you play but not perfectly tune it in a global sense.
That’s an issue with tuning instruments in general, and why pianos are generally slightly out of tune as a compromise.
As you get used to a particular guitar and strings, as you train your ear, you can also learn to work around the imperfections by adjusting how you hold down the strings (even with a fretted guitar, you can slightly repitch a string by holding it differently).