"Crime stories are one of the oldest literary genres, dating back at least as far as Cain and Abel. But the genre that concerns me here is the crime story’s modern descendant, in which a felony is committed in mysterious circumstances and then an individual follows clues and makes deductions to discover what happened.
This is a relative innovation: the first modern detective novel is usually attributed either to William Godwin’s Caleb Williams (1794), or to Edgar Allan Poe’s The Murders in the Rue Morgue (1841). There is no doubt, however, that the 1860s saw the arrival of detective fiction as a whole. This was the decade that saw the publication of Wilkie Collins’s The Moonstone (1868), ‘the first, the longest and the best modern English detective novel’, in the opinion of T S Eliot.
[…] But why did detective stories become such huge best-sellers almost overnight? What accounted for the sudden fascination with the figure of the detective? The unlucky Francis Kent’s father happened to be a government factory inspector, another profession that emerged at around this time, and yet factory inspectors didn’t suddenly become heroes of the popular imagination.
The solution can be found if we ask ourselves what a detective actually does. If nothing else, he (and, later, she) is a problem-solver; someone who can restore order where there is chaos. Faced with the worst crime (what could be more existentially troubling than a murder?), the detective gives us answers to the most pressing and urgent questions: not only whodunit, but how and why and what it means. He does all this by taking us on a journey, discovering pieces of evidence, seeking out hints and clues. In the best examples of this game, we see everything that the detective sees, yet we are unable to solve the crime ourselves. Only the detective, in a final display of mastery, can reach the correct conclusion. We need him, with his special knowledge and abilities, to make sense of it all.
In other words, a detective is a kind of priest. […]"
— Jason Webster, Aeon