The victim ID'd him. Is it possible that they truly thought that he was guilty and he wasn't framed but wrongly convicted?
Never attribute to malice that which can be explained by incompetence.
In the first case, they saw a way to rid themselves of a lot of headaches. I'm sure the rationale was, "maybe he did it, maybe he didn't, but he did a lot of other stuff we couldn't get him for." Victims can be "encouraged" to make a positive ID.