Most democratic governments have checks and accountabilities for such things:
- In a court, a mistrial may be declared if the judge was friends with one of the parties.
- In government, misconduct charges may be brought (if such things exist) if politicians don't declare their conflict of interests.
- Same goes for government employees who make decisions (in this case, of relevance, a police officer investigating a crime alleged to be perpetrated by his friend, and not declaring the friendship or excusing himself from the investigation)
Of course that's how it works in Australia. I would be very surprised if there aren't similar checks and balances in the US.
Surely you know these sorts of things.