Our 12 tone scale with the major scale note names and notes not in the major scale marked with dots looks like this:
C.D.EF.G.A.B
Suppose the aliens have a very different idea of what makes a good sounding major scale, and their system is: CDE.FGAB....
Suppose we transpose ours up 7 tones. We can represent this graphically by drawing out major pattern for two octaves, and below that drawing our major scale pattern with names replaced by X (X.X.XX.X.X.X) shifted over by 7, then look above to see how to name the notes (remembering we can only use each letter once): C.D.EF.G.A.BC.D.EF.G.A.B
X.X.XX.X.X.X
Our major scale transposed up 7 is G A B C D E F#.Let's do the same 7 tone transposition for the aliens. Their major scale pattern is XXX.XXXX..., so we get
CDE.FGAB....CDE.FGAB....
XXX.XXXX...
That's B Cbbbb Dbbbb Ebbb Fbbbb Gbbbb Abbbb.At first that seems very different from our 7 tone transposition. We only need one sharp and they need 23 flats! But wait...mod 12 we have -23 = 1.
It turns out for all transpositions if you count sharps in your key signature as +1 and flats as -1, the key signature for a transposition by N tones will have 7N sharps or flats mod 12 in both our systems.
In general if you have a T note equal temperament scale with an M note subset major scale, transposing the major scale up N tones gives a key signature with NM mod T sharps/flats.
I'll leave it as an exercise to prove that. Hint: you can think of a transposition as a two step operation: (1) a shift that keeps the same letters and just adds sharps or flats to move the notes, and (2) a renaming that changed the name you use to name the first note of the transposed scale. Think about what each of those operations does to the number of sharps and flats needed.
Only in 12TET.
Almost all sheet music that you play uses 5 or 7 unequal subdivisions of the octave, and occasionally the rest. Sure, sometimes you'll have one or two of the rest on a regular basis (blues, harmonic/melodic minor), but still most music won't use all twelve.
I don't really know a thing about music, so I could be wrong here - but that mental model at least made some sense to me when I tried to map all the concepts I've heard about into some sort of a mental system.
At least in western music you pick the seven basic notes on the scale, and that gives you the sharps and flats you place at the beginning of each line. That choice, from the point of view of notation, is even more important than the exact scale. And the choice is constrained to 15 sets of sharps and flats because it implicitly tells the player (veeeery roughly) to expect some patterns that probably will occur.
It doesn't always work great, for example if you want to write the Simpsons theme the set of notes in the scale doesn't fit any of those 15 sets. But it uses an unfamiliar scale in any case, so there's not much to gain and as a player you just deal with it.
See around 32:30 in https://youtu.be/Eq3bUFgEcb4?t=1950