Music drives new music. There are a number of ways. Improvising obviously is one. A second way starts with hearing tones in the head, called audiation. (Let us distinguish between sound and tones because tones heard in the head don't necessarily come with a specific timbre.) Beethoven called himself a "tone-artist" (Tonkünstler), not a composer. The tone-artist may experience "radio head," that is music "playing" in the head all the time. That can become a basis for composing if the composer can reproduce the tones by playing or notating; it helps if the composer has absolute pitch or good relative pitch. Within the "radio stream," sometimes something striking or attractive or distinctive occurs, worth recording or jotting down, potentially the basic idea or important pattern in a composition. Through talent, training, and experience Richard Strauss was able to audiate highly complex contrapuntal and harmonic patterns -- his music demonstrates this. The danger of audiation (or improvising) is that the composer may simply reproduce something previously heard. However, if the composer is constantly "practising creativity" by working little musical exercises or ideas in certain styles (as Verdi did), the facility gained will reduce the likelihood of repeating other music.None of the choices were right and there was no "something else". I think it is "sounds in the head" that drives composition.
A third way is more sound based, with the composer drawing on sounds heard or made, sometimes using music technology. I compose with the first two ways but not this way, although I have the relevant training and experience. It is best to hear from composers or others close to them as to how they compose. I know this poll is directed to the extra-musical factors which may "drive creativity" in the sense of steering composition towards a particular purpose or function. But that is secondary and of little worth if the main creative process of working with tones or sounds (also words, actions, or dance) does not produce excellent results.