Contrary to popular belief police officers and detectives don't want to solve every case they work on, but the reasons why they'd rather leave some cases unsolved would surprise you.
Sometimes they're trying to protect the killer:
I had been alerted to a well known local philanthropist, turned up dead. These were the days where physician assisted euthanasia was illegal in most of the developed world. This man, I had known him quite well and he had been suffering from a very serious terminal illness that was going to kill him before his 40th birthday, shattering his family... Especially his 2 young children. An autopsy had determined that he had been murdered, intentional overdose of morphine. The Health Authority and Department of Justice wanted us to investigate and bring the person who essentially murders him to justice. We chalked it up that there was no way we could ever determine who it was that killed him. Years later, his wife sent our department a letter saying she gave her husband the lethal dose to put him out of his misery. I wish I had never known.
And they'll even turn a blind eye to a killing if the victims were criminals themselves:
Ex cop, NSW - Australia. 7 years. I really never wanted to find the answer to two particular murders in my area. 2 known sexual offenders were killed in the space of 8 weeks. One was a rock spider (pedophile), the other used to drug women. The 2 issues were unrelated. Only one of the alledged offenders was caught (also a scumbag 1%). He was released after a week due to lack of evidence. I know it's bad to wish death on people but these two blokes were just rancid. As a cop it was my job to find the offenders but as a human I had no interest in solving the issue at all. Luckily I was never in charge of the investigations.
This serious topic was discussed on Ask Reddit- Detectives/Police Officers of Reddit, what case did you not care to find the answer? (NSFW)
They responded by discussing the cases they hate to deal with, and they all agreed on one thing- the cases involving children and animals are the absolute worst:
Responded to a 4 year old who was unconscious and vomiting. Without getting into the details, it didn't take long after my arrival to realize it was a cover up. My partner and I already knew where this incident was headed, but you keep your head down and try and do the job without getting emotional. Mother and father were both adamantly lying that the child had just eaten some junk food and had gone to sleep before he started vomiting. Without getting into the details, investigation revealed that the father was mad at the child for eating some junk food. So he grabbed the child by the ankles and swung him around the house into furniture all over the home, nearly killing him. It's one of those cases that you don't want to investigate, because you know ahead of time what the outcome is going to be how bad it's going to get.