Conan Doyle is an intensely self-conscious writer. Dr. Watson and Sherlock Holmes often squabble over the value of truth versus fiction and over the ways Watson represents Holmes's work. As a writer who makes his fictional characters say bad things about fiction, Conan Doyle brings ironic distance to a whole new level. We also have to wonder if his personal ambitions to be famous as a serious rather than a popular novelist might have influenced some of his nastier remarks about commercial fiction and its weak plotlines.
By criticizing cheap novels and popular fiction within his Holmes stories, Conan Doyle is making an argument that his tales about Holmes belongs in a class apart from the commercial fiction of the day.
Holmes's frequent statements that truth is stranger than fiction is a strategy on the part of the author to make even these far-fetched mysteries appear realistic and logical to the reader.