The techniques often taught by tutorials and online often suggest methods that unfortunately result in a guitar that sounds out of tune.
I remember as a child having to walk to the other side of town to a teacher to tune my guitar, it seemed an insurmountable mystery and when I’d sussed the method, my ears were pretty rubbish at working out if the strings were sharp or flat, it took a very long time to train them. I even invented a self-tuning guitar (in my head)! I saw a Kickstarter campaign recently of the exact device I devised as a nipper - if only I’d have been crazy enough to think it could exist.
These days electronic tuners can do the hard work and the majority of guitarists rely on them - but is the guitar really in tune all over the fingerboard? The open strings will be in tune, but when they are fretted there are discrepancies and adjustments usually need to be made.
Not wanting to be too technical, but the frets of the fingerboard are measured to equal temperament (so that it is possible to play ‘in-tune’ in all keys), each note is a bit out, a compromise - but the ear adjusts to this and we are now generally accustomed to it. Using the other system, just intonation, we would have to have multiple guitars, each with frets measured for just one key, or if you fancy going a bit crazy, one of these: http://www.danterosati.com/justguitar.html
This video explores a more accurate tuning method than the 5th fret model, or than using harmonics, to guarantee the guitar plays in tune all over the fingerboard. One thing to point out is that old strings, high string height or a poorly compensated saddle can impact on tuning accuracy.