"Because he attacks people who are different and preys on their secrets."
That’s why Sherlock says he hates Magnussen so. Not just because Magnussen preys on people, and not just because he deals in secrets, but because he preys on the secrets of people who are different. This struck me to the heart because it’s a big part of the (homo)erotics of a lot of detective fiction; in the late 19th and early 20th century, the people whose secrets made them different and vulnerable were most often homosexual people. These stories originated in a time when homosexuality was a newly reviled identity and homosexual acts a crime, when the pursuit of illicit knowledge always had a sexual charge and a queer potential. Eve Sedgwick calls this “the epistemology of the closet”: by the nineteenth century, “there had in fact developed one particular sexuality that was distinctively constituted as secrecy,” homosexuality. Or as she puts it most succinctly, “secrecy itself becomes manifest as this secret.” And if that’s true, we can see why detective stories with male heroes and male antagonists almost always have a thread of homosexual implication running through them. (See “Sherlock and the Homophobic Prohibition" for more on this; Anne Jamison’s great metas on ACD’s aquaintances with Oscar Wilde and Roger Casement also show how central such threats of exposure were to public discourses of law, morality, and patriotism.)