If you had to choose between a manuscript that had a great story but was poorly written (needed a lot of editing) and a manuscript that was written beautifully but the story was mediocre, which would you choose?
Neither. Because I wouldn't be able to sell either one (as is) and it would be stupid for me to invest the time, energy and thousands of dollars into something that would not be profitable for me.
However, if it was a really good story, I might give them notes and ask them to work on it--but that isn't usually enough to bring it to publishable standards. (See yesterday's post about rewriting.)