"There is nothing more stimulating than a case where everything goes against you."In fiction, everything has to go against the detective or there isn't much of a story. Even in a short story there are usually false clues and innocent parties that look guilty as heck. Otherwise there would be no story. So this quote applies not just to the detective and his enjoyment of a challenge, but to the reader and his or her enjoyment of the story.
-- Sherlock Holmes, The Hound of the Baskervilles, Chapter 5
Besides, how can a Great Detective be a great detective if if is all obvious from the beginning? The ability to overcome obstacles is what makes a hero heroic. In detective fiction some of those obstacles may be physical, such as a villain with a gun, but often they are intellectual -- trails that go cold and theories that don't pan out. Sherlock Holmes has his share of both.
One of the greatest hurdles to someone writing mystery novels in the Great Detective tradition, in which the sleuth is a larger-than-life character in the mold of Holmes, Nero Wolfe, or Lord Peter Wimsey, is how the detective can fail to solve the crime for hundreds of pages and still look like a superhuman genius. It's a big plot problem.
One solution is for everything to go against the sleuth, thus affording a worthy challenge. The Hound of the Baskervilles is the only canonical novel where that really works. The other three are really novellas with long flashbacks attached.
What is your favorite Sherlock Holmes quote?