Folk musics started on simple–unkeyed–winds. And the tunes come from the available instrument, and what’s playable on them.
Same in classic music! See Beethoven; he didn’t have access to the modern grand piano, only piano forte, so his works had to take this limitation, while he would surely have liked the modern superbasses… <-----OK, wait, I know you guys. This is not a PG website. So read super basses, not superb… (though Ludwig woud have like both I’m sure) :roll:
The limitations of the leading instrument will cut the ability for accidental tones, AND range.
There’s also the modal issue. Modal music can be described, as opposed to “tonal”, as based on:
-
modes, eh! I.e. a sequence of tones and haftones (or more steps) describing a “scale”. Say, mixolydian: so-la-ti-do-re-mi-fa-so.
I intentionnally use the “relative solfying scale” here, because the starting pitch is unimportant. What counts is the steps, here in semitones: 2-2-1-2-2-1(-2)
-
How come then we play so often ITM in D, G, or Am? They happen to be the easiest scales to play on D whistles and flutes… Why are they in D, then? Because some base pitch had to be agreed upon if people wanted to play together. In Ireland D, the so-called “A” in Scotland, B-flat in Brittany, G in many continental folklores.
-
In “classic” music, there’s an idea of a intrinsic “colour” for a given tone. One pretends C-Maj to be “luminous”, open, and F#M “somber”, etc. So you get all this big compilations in the 24 “tones” (12 pitches X the two “classic” modes M & m). And since, say F#M is supposed to be dramatic, well so it will be written in this spirit 
-
In “classic” music, mastery is often demonstrated by subtle alterations (accidental, i.e. off-scale, notes) and multiple changes of tones within the part.
-
In modal music, whether ITM or say, Oriental singing, the mode remains generally constant within a tune. It’s the ornamentation which demonstrates nuances and/or virtuosity of the performer. Think of “modulating” a tone…
-
Classic music has its very special minor, the harmonic, i.e. like Eolian with an augmented 7th. Try B C# D E F# G A# B on your whistle. Or worse (no x-fingering available): E F# G A B C# D# E…
It may be standard, but “classic” music notation hasn’t yet agreed upon a way to write such a basic scale without alterations within the part, and not only at the key signature… Hence some weird F##, etc.
-
Because of what is stated above (4, 5, 6) an orchestral instrument needs to play all possible alterations, hence their (abusive) name of “chromatic”. This doesn’t mean you’ll force woodwinds to play constantly off their “natural” voice (they all have a bell tone).
A totally chromatic instrument would transpose in any tone with equal ease, not only accidents in a given tone. For this they need be “atonal” (not favouring any scale in particular, as opposed to the piano favouring C major).
Some strings, whether fretted or not, may almost qualify. They’re not that many true to the above definition, beside the harp (and related orchestral instruments: cymbalom, bandura), the chromatic button accordion but not the slide trombone 
PS: a “chromatic scale” remains theoretical music, except of course if you concentrate on playing Alban Berg
You will still have to build “your” scale out of the twelve tones available. Now, not only if you play him, or Debussy or any 20th century “classic”, you will find “classic” (or earlier, i.e. baroque) music demanding on “diatonic” instruments.
Jazz, of course, is even worse: not only do you need all accidentals, but will welcome also an ability to strongly bend the pitches up/down to quartertones: we’re getting out of the rigid, semitone by semitone, standard piano tuning.
PPS: I see many of my explanations duplicate Weeks’. Well, I’ll leave mine as is.
Btw, Weeks, one likely explanation to the loss of the viola-de-gamba and/or recorder is their lack of power – in the sense of dB, noise. They were chamber music instruments, while what we tend to call “classic” music for short is a lot of symphonic. What the 19th century changed was a slide from the dominating chamber music to the big modern orchestra. Hey, from private in-home music to bigger theaters, operas, and public (and popular) performance.
This is why you won’t find the guitar either in the big philarmonic thing.
We owe the return of the flute in the big orchestra to Boehm, and he was originally after sheer power in the flute.
Paganini seems to have been among the first to have his violins rebuilt for increased tension–power again. But this is why he was known to break strings. Add a few more strings as on older fretted instruments, with the same tension, and the whole structure will collapse.
Note that the early 19th, while getting rid of the fretted bowed strings, at the same time developed the keys on brass (horn, trumpet), which is apparently a reverse trend. 