It's simple, just like it helps a writer to actually write, a composer is only good so long as they're actually writing. Once something is written, you can test it, you can analyze it and compare it (this looks like beethoven, this sounds like brahms, this seems like ligeti, etc) and it creates a very precious feedback loop. You don't necessarily have to hear what you wrote, if you analyzed and know your literature, you'll instantly recognize style characteristics you DO know how they sound like (afunctional 3rd chords stringed together with ring a little like french modernism, heavy chromatic lines sound like early atonality, etc.) You can get the "gist" of what you're doing all the same, which is sometimes just enough.
Other times it isn't enough and you need to try it out, which is fine too. Many, MANY composers used a piano for this, or a harpsichord (or organ,) and it's understandable also: our brain can't handle as much information as we think it can. No matter how you imagine X or Y sounds like, you can approximate it as much as you want in your head, the feedback loop is much better if you actually heard it back, rather than having to imagine it. It's simply how we work, we require all the information we can get to make better decisions and having to hear what we wrote is much, much better than having to just imagine it (but like I said above, there are many ways to properly imagine what you wrote that sidestep typical "ear training" nonsense.)
Computers HAVE already produced music, and in reality if it sounds like Mozart or any other composer it simply depends on the code programmed to make it follow rules. After all, having a computer simulate something ex post facto is easy since we have all the material we want to emulate readily available, all it takes is writing the simulation parameters code.
Another question entirely is if the output of random number generator coded to output musical material and values qualifies as music. I think it does, obviously, but since it's random chances are the output could be very different (and interesting?) I've only tried this a few times, but every time it was a very interesting experience to see what kind of random things would pop up and sounded great.
1) You're cool.
2) I want to add, not only it would be possible to teach someone deaf composition, but it's quite likely that it would engage them intellectually if they could get over the fact they can't hear their end product. I think the biggest barrier here is psychological, not something purely technical. You can also teach a blind person to paint, but their inability to engage in a feedback loop with their own work will hinder them invariably psychologically just like it would hinder us to paint on an invisible canvas with invisible ink.