When police think they have right suspect they often do everything they can to prove that person did it. Essentially, once they have their targets set on a suspect, they shift from trying to figure out who may have done it to putting all their resources into finding evidence against the suspect and building the strongest case they can against them. This includes ignoring evidence that is counter to their theory and discontinuing investigation of other leads.
Their goal at that point is to convict. Because, to them, getting a conviction is success and the person going free is failure. Alternately, getting the person to “commit suicide” is success because they can claim that they were guilty and no trial is necessary.
It’s all about winning and getting a conviction because conviction=justice=case closed. And that means the public can rest soundly knowing “justice” has been served. Especially after PR has done their work.
Prosecutors are the same. They treat their job as finding anything and everything to get the conviction. Exculpatory evidence is ignored and buried. If “evidence” is planted/manufactured, they do their best to ignore and hide that fact and make said evidence look real. It’s the defense's job to prove innocence. In theory, the police should be working to find and provide evidence for both sides, but the police and Prosecutors anre working toward the same goal, leaving the defense severely hindered.
This is the system that railroads people into conviction. They use the media to amplify their story and make it look like they are infallible. When information comes out that counters the police/prosecutor story, they circle the wagons to protect each other and discredit the information that contradicts them. Because they think that they are the good guys and even if they got something wrong, their original hunch must have been right.