Mysteries are highly structured books. It is to the author’s advantage to know the outcome of the book by making a plot outline and sticking to it. It is much easier to plant clues and red herrings if the author knows ahead of time “whodunit”. If the writer doesn't know the outcome of the book, or changes his mind about the perpetrator of the crime, he will have to go back and plant or change the clues after the book is finished. This can be a very wearisome job. It is much better for a writer to know where the book is going from the start.
The red herring’s purpose in a mystery is to distract the reader from what is really going on by introducing false or misleading evidence. For example, a woman’s fingerprints might be found at a murder scene, causing her to be a suspect. A neighbor might have seen a suspicious car drive past. Neither of these events may have anything to do with the actual crime.
Tying Up The Ending