The way to learn the logic behind the scales in my opinion is to learn the theory of the early Western music, up to the Baroque era, that was around while the staff was being developed. That is: learn the seven modes of Western music (
https://en.wikipedia.org/wiki/Mode_(music)).
Each mode is a diatonic scale (https://en.wikipedia.org/wiki/Diatonic_scale). Each mode has a particular combination of whole steps and half steps. Each mode has a "natural" key which can be represented in modern staff notation by all white keys.
In Gregorian chant, there are rarely any accidentals. Even by the Baroque era, while there are more accidentals, I would say the music is still very diatonic in nature.
Early music was more oriented towards just intonation (the whole integer ratio harmony mentioned in the article, which is what I would consider the more "natural" way of harmony). With just intonation, however, you can't just shift to any random key on the fly. Some keys sound nice and related. Some keys sound awful and horrible.
The article author made a statement: "If your music mostly relies on the seven notes from a particular scale, then it’s more compact to only have room for seven notes in your sheet music, and adjust the meaning of those notes when necessary… right?" I think that's an absolutely a correct way of framing early Western classical music, yes.
What makes staff notation harder probably is the corresponding rise in chromatic music.
The rise of 12TET instruments (equal temperament) like the piano, and the corresponding development of chromatic instruments (compare: the natural horn used in the Baroque era vs. the modern valved horn) allows for this sort of modulation at the cost of some chords being slightly out of tune. Modulating key signature all over the place is now possible. Yes, the author should realize that some composers do change the key in the middle of a song to change the mood. (For a nice pop example, here's the Temptations' "My Girl", which changes keys midway through -- https://www.youtube.com/watch?v=6IUG-9jZD-g)
Incidentally, the diatonic nature of pre-19th century classical music is the answer to the author's sharp / flat question as well. (http://jtauber.com/blog/2006/11/17/why_a-sharp_is_not_b-flat...)
This shift to chromaticism really isn't reflected in staff notation. In fact, I'm aware that some 20th century composers abandoned the use of key notation, ledger lines, etc. altogether, perhaps in part for this sort of reason.