I just picked up The Figure of the Detective: A Literary History and Analysis by Charles Brownson. Some nice thought-provoking points in the preface!
“The Detective is, and was from the beginning, a figure of iconic status, drawing to himself many psychological and cultural desires and fears, thus becoming a nexus through which such issues could be understood, studied, accommodated, and perhaps ameliorated.” (P.1)
“…literary formulas (genres) are not arbitrary constructs but come into existence out of the needs and fears of their readers, and so any change in the formula must be driven by social changes. Much more than literary (that is, non-formulaic) fiction, genre writing is an index of social change. A history of the genre written with this in mind would treat it as a living thing and perhaps uncover new connections and explanations not noticed before.” (P.2)
“Whether these stories are worthy of attention by readers and critics, or are simply lowbrow entertainment, has nothing to do with the cultural work that the Detective does. But at the same time, that there are such controversies at all is indicative of some cultural need. What is it? Why, at particular times of hegemony and change, does the detective story have such a popular appeal, impervious to intellectual disparagement? Of the needs that the reader is hoping to satisfy, entertainment is likely one of them, but the desire to be entertained is not confined to the detective story. The question is rather why we are entertained by reading stories about detectives, and sometimes needful beyond simple entertainment. It seemed to me that the resonance and endurance of the Detective as a cultural and literary figure implies some importance that has nothing to do with whether or not detective stories are bad for us.” (P.2)
Ref: (italics in original) Charles Brownson (c2013) The Figure of the Detective: A Literary History and Analysis. McFarland & Company, Inc, Jefferson, North Carolina.