It is a common myth that a composer's job mainly is about coming up with beautiful melodies. This is how composers usually are portraied in movies, they struggle hard to find the perfect melody, until it suddenly strikes them in a burst of inspiration and the full work is as well as finished in that instant.
I'm sorry, but this is not how it works in real life. Sure, a melody can come from nowhere in a sudden burst of inspiration, or it can be easily improvised without any analytic effort, but that's about 1% of the job done. Coming up with a decent melody is the easiest part, it's also very easy to create those passages that sound really cool. But even if you come up with one hundred cool passages, you most likely cannot create a great piece of music from them alone.
The hard part of composing is to create a coherent piece of music. This is where analysis can be most helpful. Analysing a single poignant passage as such will not help you very much, but analysing it in the context of the rest of the piece can be most illuminating. If you for example analyse the themes in a Beethoven sonata and compare them to each other, you can find a lot of explanations to why the sonata feels like one piece of music, rather than just a list of themes. Same goes for Debussy. An analysis that only notices that he uses some major and minor chords is of no value. An analysis that finds the connections within the piece, the internal references that makes his music coherent, can teach you a lot.
As for Schenkerian analysis, the important part is not to find the children's tune behind the harmonic structure, though it admittedly can be found in most classical tonal works, because they followed the same tonal structure (when reduced enough with Schenkerian methods). However, you can learn a lot from Schenkerian analysis when you study the different stages of the analysis, e.g. how the different harmonies have been prolonged at different levels.
Of course, it is also possible to create music through improvisation, but you must understand that there's a huge difference between composing and improvising. When you improvise, you create in the moment and when done improvising, the music is finished. When composing, you have the possibility to perfect every single aspect of the piece, for as long as any potential deadline allows you. For every single melody, every rhythm, every harmony, every accompaniment figure, the orchestration at any given moment and most importantly, the structure of the work, you may ask if it is the best possible or if it can be improved in some way. Nothing is ever perfect, there's always room for improvement, so this is the point where the better composer can find more things to improve. At this point, analytical skills comes in handy. If something doesn't really work, it is usually possible to analyse which part of it doesn't work and fix this.