Four P's in publishing: Product, Presentation, Pricing, Promotion. If you're seeing a good presentation and the book doesn't sell, it's a problem with one or more of the other three things. And just because the writing is competent doesn't mean the story is grabby: engaging and hooky. Or that the characters pull you into the story.
What really sells beyond marketing is word of mouth, and that's mostly story. But to get the word of mouth, you have to get the book in front of people, which is where promotion (they have to see the book), presentation (they have to click on the book, and that's got a lot to do with the cover, and then they have to look further--that's the blurb), and pricing (they have to not click away OR get a subconscious message that it's no good--too high or too low a price for the genre).
And then there's the fifth thing: Is this the only book the person wrote? Or are they writing a book a year? Not really enough to make it either in indie or trad. I don't think you need a book a month or whatever--I haven't had a release for 4+ months right now, myself, because I've been writing ahead for this year--but I do think you probably have to be able to do 4 books/year to keep reasonable momentum and visibility.