The investigating officers. The ones she made her complaint to to begin with.
Can you see why I have a problem with your story?
Clearly, an injustice happened, if what you say is true (leaving out the confusion of departments and personnel and all). I wasn't arguing that no police are ever unjust. But even here, it's not just the police. When you learned this, did YOU go to your friend's lawyer? Did the lying girl go to the friend's lawyer, to the DA (or whatever prosecutors you have in your jurisdiction)?
Yesterday in the court where I often work we went through 108 cases between 9:15 and 12:15. In many of these cases, defendants and their expensive lawyers waited for more than 2 hours (at $250 an hour) to be told that if they were not going to cop immediately, they would have to wait until March 11 for their trial. So some defendants paid some lawyers to be $500 to be bored and uncomfortable. Not a lot of justice in that! And such verdicts and sentences as were passed were pretty much pro forma -- "rough justice"
But (this is Juvie, so we're talking about kids here) what I kind of hope the kids learned was that it is WAY better to keep your nose clean and stay far away from the so-called "justice system", because it is clunky, ineffective, underfunded, inadequate, and a HUGE PITA! That, evidently is all the people are willing to pay for.
To relate it to your case: If YOU had gone to the papers, if YOU had marshaled your friend's other friends, if YOU had gotten a lawyer, and maybe a lawyer for the girl (who could argue diminished competence or some-such to mitigate her lie), if you all were to actually expend some cash and effort on your friend's behalf, you might have been able to prevent and might now be able to stop this injustice.
Heck, you might be able to start a civil suit against the girl!
Mind you, that DOES take more work than deciding that all LEOs are unjust.