There are two things occurring here.
Police get raises and recognition for closing cases. In general they don't care if you're guilty or not, that's someone else's problem. Same with the detective, same with the DA. The more cases they close they 'tougher they are on crime'.
The next thing occurring is
Similarly: https://en.wikipedia.org/wiki/Automation_bias