In an AH.com there was an argument over SM Sterling, My opinion of Stirling's ISOT and Emberverse Series. Sterling is contentious figure who has been banned from AH.com after getting into an discussion about containing moslem terrorism. On the other hand he is very influential on the entire genre of alternate history. Many topics discussed on AH.com are derived from concepts and scenarios that Sterling first developed. When the the entwined concerns of literary and commercial merit came up, with the usual slagging anything that is popular,the conversation deadened until Tom Kalbfus brought up too subtle slagging of a successful politico/author.
I think time and only time is the true test of a classic work. If someone writes a book and many copies are sold and 50 years later people are still buying many copies of that book, that may be a classic.
There are of course other reasons people might buy many copies of a book, for instance the writer happens to be a politician, maybe a Senator for instance. The Senator does one of his constituents a favor, but he doesn't want to be seen accepting kickbacks, so what does he do? He writes a book, not a particularly well written book, but somehow it still sells lots of copies, imagine that, in fact the author makes $6,000,000 from the sales of his book, and then just as mysteriously the book sales plumment, but the Senator is still happy, he deposits his money in his bank account, and then asks other wealthy and influential constituents if there is anything he can do for them, and then he mentions the book he has written.
I have no one in particular in mind, its just a hypothetical example of how someone may well many books without being a good writer.