I don't play viola or any other orchestra instrument, but do play some guitar, so much of this is just a guess.
I'd guess that a big factor is that guitar is a good solo instrument. It can do melody and chords well. You can get a good full sounding piece of music out of a guitar. Also if you want you can sing while you play so it works great if you want to add words to your composition.
Most orchestra instruments don't really work nearly as well solo. Yes, many classical pieces include solos for various instruments but those solos are meant to be in the context of the orchestra or string quartet or whatever. If all you've got is a lone violinist while that can be beautify it is not going to have the richness that you can get from a lone guitar (or a lone piano). Also for many orchestra instruments singing while playing them might be hard or annoying.
So if I want to try composing for my guitar, I only have to get good enough at composing to compose decent guitar music.
A violist would probably need to get good enough to compose for viola and for at least the rest of a string quartet.
I'd guess that a big factor is that guitar is a good solo instrument. It can do melody and chords well. You can get a good full sounding piece of music out of a guitar. Also if you want you can sing while you play so it works great if you want to add words to your composition.
Most orchestra instruments don't really work nearly as well solo. Yes, many classical pieces include solos for various instruments but those solos are meant to be in the context of the orchestra or string quartet or whatever. If all you've got is a lone violinist while that can be beautify it is not going to have the richness that you can get from a lone guitar (or a lone piano). Also for many orchestra instruments singing while playing them might be hard or annoying.
So if I want to try composing for my guitar, I only have to get good enough at composing to compose decent guitar music.
A violist would probably need to get good enough to compose for viola and for at least the rest of a string quartet.