Mystery as a genre is often dismissed as...well...genre fiction. It's true that there are expected, almost required elements that can make a mystery formulaic. Events sometimes veer from reality for the sake of plot. The police ignore possibilities outside the box. The protag loses his cell phone. He goes alone to a place where every sense should be screaming, "Don't!" A convenient character shows up and drops an essential bit of information without any real reason for doing so.
(In the book I'm currently reading--big name author--the protag is just wandering through an area and two complete strangers venture out of their homes, one after the other, and invite him in. Each provides valuable information about the case. Maybe I'm lacking social sense, but I cannot recall the last time I saw someone passing on the road and asked him in for tea!)
Mystery writing--at least the best of it--requires writing talent along with an additional skill: mystery construction. To create characters who resonate, plots that hold interest, and settings that pop is one thing, and we certainly want that. To at the same time drop hints for the reader, hints that add up later but don't give the whole thing away, is both different and difficult. Everything has to contribute, every blind alley must be believable at first but then not. As a reader, I feel cheated if a character has shown no sign of evil and yet is in the end. I hate it when the crime is so elaborate there is little possibility of it succeeding, and yet it does. I'm angry when the evildoer is not even on the radar until the final revelation.
In addition to good story-telling, then, a mystery writer has to do good mystery-telling. Unlike other genres, mystery is a maze. The writer knows the layout, and the reader must follow his lead. He should not meander, should not examine unrelated avenues. He should guide the reader deftly, with a clear reason for every twist and turn taken.
A reader of mystery should be entertained by good writing, but she should also find at the end that she was given, within the maze, a fair chance to solve the puzzle by herself. One hopes that she missed it, being so entertained by the journey.