This could be a coordinated scam.
Suspect A commits a murder.
Just as Suspect A is about to be convicted,
Suspect B claims to be the guilty one.
So Suspect A is found Not Guilty.
Then, when Suspect B is tried and about to be convicted,
Suspect A confesses, so that Suspect B will be found Not Guilty.
And, because of the prohibition against double jeopardy,
Neither Suspect A or Suspect B can be tried again for the murder.