I'm trying to figure out in which situations say, a G# is preferred to an Ab. I know that the two spellings wont necessarily represent tones of identical frequency, and that they only coincide in equal temperament tuning. But within equal temperament, most resources I've seen online insist that the note G# is not the same as Ab, despite them having the same pitch. So I'm assuming that it's not that the notation is wasteful, but that the two spellings somehow signify different things to musicians.
I get that within scales we only want one note of each letter A-G, so that G major scale consists of G A B C D E F# and not G A B C D E Gb. But say I'm considering the note G# (Ab, F###, Bbbb etc.) in the context of a melody within the key of C Major. I can't see any reason to prefer any one enharmonic spelling to another. I guess that requiring maximal simplicity would reduce the number of possible enharmonic spellings to just two (i.e. we could discount F### etc.) but I can't see a reason to prefer G# to Ab or vice-versa.
Another case I find problematic is that the Augmented C triad is written (C E G#) and not (C E Ab). I understand that it is called an augmented chord because the fifth was sharpened, but why don't we call it a diminished chord because the sixth was flattened? I understand that there's already a pre-existing diminished chord; I'm questioning why the chord is named and spelled in terms of "what happened to the fifth interval?" instead of "what happened to the sixth (or any other)?"