... long boring answer...
If no one knows, it may be of interest to look up the "pythagorean hammers". Pythagoras found that frequencies that are in certain proportions to each other sound well (consonant) while the rest sounds not so well (dissonant). The proportions that sound well are 1:1, 2:1, 3:2, 4:3, 5:4, 9:8...
If I'd play on a synthesizer two tones in one of these proportions, a musician could label the proportion, or interval, this way:
- 1:1 - unison
- 9:8 - major second
- 5:4 - major third
- 4:3 - perfect fourth
- 3:2 - perfect fifth
- 2:1 - octave
OK this sounds reasonable and is still easily understood, right? But now comes a hard part with logarhythms and roots and squares - let me skip some mathematical work to spare those that don't like that.
Let's fit twelve intervals of logarithmically increasing length in a single octave. Let's also skip ahead a bit and call these intervals "frets". This now means that moving your finger one fret up increases the note's pitch with a factor of 1.05946 (the twelfth root of 2). Moving two frets increase the pitch with factor 1.1125, three frets is 1.1892, .... , 11 frets is 1.88775, and 12 frets is exactly 2.0000.
If we look specifically at the distances of 2, 4, 5, 7, and 12 frets, we find the following pitch factors:
Using 12 frets, the fun part is that "almost" in this little table is good enough for us, since most all people can't hear the difference. Cool! With 12 frets in an octave, we can use all of those ratios, or intervals, when we play the guitar, and our fretboards give us those intervals independent from where we start, both up and down: you can go up or down by 4 frets, and hear a major third (even though it's slightly too high, off by a factor of 1.007937, that's too small to discern).
If you had 13 frets, you'd also have to use 4 frets for a major third, but it'd be slightly too low, off by a factor of 1.009916 - you'd definitely hear that.
If you had 11 frets, you'd again have to use 4 frets for a major third, but it'd be much too low, off by a factor of 1.02933 - you really really wouldn't like that, but the 5th fret is even further away from the major third!
I could bore you some more, but I'd rather hope I've already shown why 12 frets in an octave on our instruments works well, and why ordering a guitar with 11 or 13 frets in an octave might not work as well. Of course, Wikipedia is full of articles on scales, intonations etc. that are much more elaborate, correct, and boring than this not-so-little post...