In principle, there's nothing wrong at all with a trial-and-error approach to composition. Many of the greatest Rock songs and Jazz tunes have originated from mindlessly jamming along.
What is however, IMO, in fact wrong is to use a computer for that. Not when you actually intend to write electronic music of course (though I still don't much like such digital composition, but that's just my personal taste). But when you write for an actual band you should try it with the band. Computers may be able to approximate human performance, but ultimately that means the programmer is involved in your creative process.
Which may again not be bad in principle. The problem I perceive is that the interaction goes the wrong way around: the programmer has to kind of anticipate every idea you as the composer might come up with, and prepare the program to react to it like a human performer would. In practice, this is often implemented very badly, at least in simple solutions such as MuseScore1: a wavetable is picked, fixed choice based on the instrument you request. Then each note is played basically as an exact copy, merely moved to a "mechanically calculated" start time, trimmed to a specific length, pitch and dynamic level, but disregarding the musical context. That is completely unlike what good ensemble players do, namely create collectively a musical pulse, phrase the notes in a natural voice-like manner, intonate towards each other and adjust the dynamics to emphasise the crucial points. As a result, if you feed a computer a good score it will sound bad. If you tweak the score so it sounds sort of good on the computer (almost impossible anyway), it'll probably get horribly contrived and sound not good with the actual band anymore2.
So whatever "feedback device" you use during composition, you have to account for how different the actual intended ensemble sounds. That always requires experience, but IMO it's rather easier if you use, traditionally, a piano / organ / guitar to try out the harmonies, rather than a computer program which pretends to sound like an actual ensemble, but still doesn't.
Of course, with more limited devices you need to have more knowledge yourself about how stuff might work out. That is what music theory gives you. It basically is a framework to systematically categorise what intervals can be used to achieve a certain musical effect, independently of details of the instruments / the performance etc.. Once you've properly grasped these categories, you should be able to figure out the eventual result purely in your mind, with all the details. Really good composers can thus create masterpieces with paper and pencil alone (sadly, Beethoven was actually forced to do this). Most people still require some piano harmonies to hold on to, that's fine. But it's certainly not good if you require the computer for every single note.
That's my opinion. So, I suggest you do properly learn some music theory from books, Wikipedia, systematic trial&error, whatever.
1There sure enough are far more sophisticated algorithms around nowadays, e.g. Synful; but then these require you to specify much more information than you'd normally put in a score.
2Unfortunately, more and more composers do go this route now. I am very unhappy with most of the results, but what can I do.