I memorized all the key signatures in theory class, but I didn’t see how they applied specifically to the guitar; and they don’t.
The key signature system is based on the piano, as well as the note names and the notation system. The ‘mechanical nature’ of the keyboard is such that each pitch and chord inversion has a unique relative position in the octave; not so with guitar, where a note can be found in more than one place.
The key signature system is derived from the physical layout of the keyboard, and so lends itself to piano, because if a note is flatted or sharped, it’s a black key. Not so on a guitar, where these flats and sharps are just “names” or note identities we must identify with pitches which could occur in several places, and are not unique.
The physical layout of the keyboard, and its key signature system, are also geared towards the 7-note diatonic scale. This is reflected in our notation system, which also appears arbitrary to non-keyboard players: there are semitones between E-F and B-C, but all the others are whole steps.
If one starts building fifths from a starting point of C, then going “forward” or clockwise around the “circle of fifths” would yield C-G-D-A-E-B-F#(C#) - no need for D#.
If, on the other hand, you go in reverse (counter-clockwise), you travel the “circle of fourths”, which yields C-F-Bb-Eb-Ab-Db-Gb (Cb).
There are three keys which “overlap” under two different names: B (Cb), F# (Gb), and C# (Db). The reason it goes no further has to do with the physical layout of the keyboard itself (there are two semitone steps in the letter sequence, E-F and B-C), and the subsequent “letter-naming” of notes which results.
To be a diatonic scale, you must have seven different letter names, with no repeats of a letter, and no double-sharps or double flats.
For example, there is no key of “Fb” because this is E, a sharp key; but if we named it anyway, we would get Fb-Gb-Ab-Bbb (you can’t repeat A - there must be seven different letter names with no repeats), Cb-Db-Eb-Fb. This “repeating letter or double-flat” dilemma does not arise on the three “repeat” keys of B (Cb), F# (Gb), and C# (Db), because this is the “seven-letter limit”.
As far as music ‘tests’ which ask for instant answers to “What is the 6th degree of the key of Bb?”, this demands that note names (pitch identities) be memorized. If you play me any tone, I can sing you or play you degree 6, based on its relative position to Bb, which is a minor third below Bb (or the maj 6 above).
So in the test, the reasons for knowing the letter-name of a pitch has little to do with hearing the sound of the pitch; letter-names are used for notation, and for names of the physical piano keys. The letter name is only the label for the sound, not the sound itself. Labels are used in contexts, for specific reasons.
As a guitarist, my instrument does not yield one unique pitch name which corresponds to a unique location, like on a piano or on a staff. A guitar yields unique patterns (scales, arpeggios) which remain the same when moved chromatically and linearly. The only time single pitches have unique positions is on single strings, which is a linear dimension like the keyboard, which goes up or down chromatically and linearly. But this linear succession of notes does not correspond literally to linear staff notation, since E-F and B-C are named in preference to the keyboard layout.
The guitar also has a vertical dimension, for moving unique patterns which span strings. This is why guitarists tend to think more visually, in patterns, rather than abstractly or in terms of notation, note-names, or key signatures. Tablature makes a lot of sense for guitar in light of this.