As long as both mysteries are resolved, I don't see a problem with it.
+1 Ash for Columbo. Also, there was recently some miniseries on TV about a woman, a young mother. In the opening, she inexplicably attacks a man and murders him in front of many people. The mystery is not who did it, or how to prove it, but why: Even she does not know why she did it, and has no motive.
I did not watch it (short on time for other professional reasons), but it is an interesting premise.
So yes, investigating "how and why" can be interesting, and once "how and why" is figured out, investigating how to stop it can be the rest of the story.
Yes, that can still be called a mystery. Much of the motive in investigating any murder is punishment, but a healthy part is also to get a danger to society in jail, in order to prevent future murders. Presumably the first murder is the one they hesitated on the most. This is just a logical extension of that same motive for the investigator.