It seems to me that the question is one of genre or focus rather than of merit. It also seems to me that the purists who would insist on a distinction are ones that only count "purely literary" works as worthy, the other being inappropriate or somehow lesser forms of the art.
This was being discussed recently on The Reading Experience:
"The reason I feel confident teaching literature for its potential social usefulness (again, broadly conceived) is that I think that an overwhelming number of writers, British, American, and non-Western, themselves write with some idea of usefulness in mind. The value of literature is almost never just 'literary,' even for writers; one also reads (or writes) literature to engage ideas from philosophy (inclusive of ethics and morality), history, and politics. None of these related regimes of thought are by any means required to be obviously present, and some writers might really not be interested in things like politics or history. There aren't many of them, and most who say they aren't interested are lying. Even the great, 'literary literary' T.S. Eliot explicitly coupled his taste in literature ('classicist') with a politics ('royalist') and a religion ('Anglo-Catholicism')."I have to agree with Amardeep against the author of the surrounding post. It is simply the case that a writer cannot create a "purely literary work" because the concept of a purely literary work is an abstraction that does not exist. Anything an author (or any other artist) creates arises out of a worldview and takes cues from the culture that produced him. As Amardeep points out, an author may not intentionally be interested in philosophy, history, politics, or religion, but his work will reveal these preconceptions (conscious or not) in the course of his writing.
The best authors, even those whose purpose was to explicitly advance the field of literature through experimentation in its forms, were conscious of the interplay of their culture and their art. The very best authors can explore all of these thinking fields in one work, and the "literary" quality of their creations is the better for it.
All of this begs the question, what exactly is the purpose or function of art? How does one measure merit of one work against another? Whole academies are built around the exploration of such questions, but I would go so far as to say, if a literary work does not somehow touch on the very human dimensions of philosophy, history, or religion, then how profound an impact has it made?