Growing up, I remember hearing about the idea that mystery writers took the ending and then worked backward. It didn't make any sense to me. Stories proceeded organically from start to finish. The ending is a conclusion based on everything that happened before it. It simply can't be used as a starting point.
Having grown up, I can understand it better. Once you know who the murderer is, you know why they did it, how they did it, and how they tried to cover it up. Then you just put the other people in there and let everything unfold.
In all honesty, it still feels kind of crazy to me. But what is even crazier is that it is the exact method I use to make jokes, and I have no problems with that. Making jokes by working backwards is easy.
I start with a punchline. "The early bird gets the worm." Then I figure out the wordplay involved. "There is a literal worm in tequila bottles." Now I am talking about drinking tequila as getting the worm. From there, I try to find a way to get the other key words in the punchline involved in a scene: "early" and "bird". Early can always be visualized as sunrise, and bird can be any species, preferably very common and easily imagined (I will go with the pelican). I now have my joke.
Did you hear about the pelican who woke up at sunrise and drank a whole bottle of tequila? He lived by that saying: The early bird gets the worm.
Seeing the process of making the joke, it's way less funny. That's the nature of the beast. But to hear that joke out of nowhere is pretty comical (assuming you have good delivery). Try it on your friends. Still, the point is that sometimes the easiest way to write things is to work backwards. Really, it comes down to getting the hardest part done first, then filling in the blanks to make it fit. Once again, proving that writing is a logical process.