There's a lot of discussion about the "mousetrap" analogy with today. Most experts say that it doesn't matter how great your product (or story in the case of a book) is, the world needs to know about it.
JK Rowling's did write a nice story, and it was "found".. Depending on the version of the story you hear.
I come down in the middle. I believe that a great product is important, and that good marketing will kill a bad product faster. In fact, I think a great book is necessary just to talk about book marketing.
Here's another story about the start of the Harry Potter tale.