Musical nomenclature is a total mess because it’s evolved slowly during a time when we were still learning how sound actually works. At first it was just “well, these notes seem to sound nice for some reason, let’s label them.” and “Hey, if I play higher or lower notes outside the range some of them end up sounding like they’re ‘the same’ in some way to these notes. There’s some kind of repetitive cycle here.” Then it was “Hey, if I tune one or two of these notes a little bit off deliberately so it’s sort of halfway between where it was and the next note up, it alters the mood of the music in an interesting way.” Musicians had a good intuitive artistic feel for “what works” long before science really understood what was *actually* going on. Like the fact that the cyclical sensation where a “C” note has a sort of cousin that also sounds like “C” a bit higher, and another one that also sounds like “C” higher than that, and so on, being because those higher versions of “C” have frequencies that are at exactly 2x, 4x, 8x, and so on, while the lower versions of “C” have frequencies that are exactly 1/2, 1/4, 1/8, and so on. The idea that every doubling causes the cycle to repeat was not understood – just that you can hear that it “sound the same” for some reason.
In the end, it turns out that the originally chosen notes of A,B,C,D,E,F, and G weren’t *actually* scaled evenly (or at least evenly on a logarithmic scale). Some of them were “skipping” a step in between and some weren’t. If you map out all the notes between and actually make the notes “equidistant”, then you get the 12 notes of the scale you mention. It turns out the ‘flats’ and ‘sharps’ that had been inserted “in between” the 7 named notes were there specifically because those are the ones where there was twice as wide a gap between the adjacent letters. At that point it would have been possible to rename all the notes so they go from “A”
to “L” with no flats or sharps. You could still have had the idea of “keys”, but then a “key” would be a chosen subset of 7 out of these 12 notes. And the places where you are going half a step up or a full step up would be more explicit and clear that way.
But by then the nomenclature was stuck. It was too ingrained in culture. So we got the utter mess we have today where it LOOKS like, say, E and E# are only “half” as far apart as say D and E are, but they’re not, not really, because in the original letters, D and E already were a half step apart to begin with and had no “sharp” in between them, but we didn’t really pick up on that until later. Again, it’s an evolved nomenclature that dates back to a time when things weren’t as well understood, so it’s kind of a confusing mess today.
Latest Answers