If defending a person, in the face of prima facie evidence, has the result of preserving their reputation and status (and keeping the reputation and status of the accuser in their original state) then it doesn’t feel useful or good.
And I take the opportunity to nudge them and ask, "They did a bad thing. Does that mean they're always bad? Can they make things better? Should we forgive them? How do we know when to forgive them?" (not in a single tirade; these are just questions I drop over time.)
Because, in anticipation of the fact that they're definitely going to fuck up along the way, I want them to learn that mistakes and failures and even doing bad things don't make them irrevocably bad - that ultimately, the most important thing is making amends / trying again / etc. That your worst decision is not the sum total of who you are.
I don't see why I should try so hard to teach that to my kid, and then "disavow" friends who may have fucked up.
1. helping a friend hide the body
2. telling your friend they are in the wrong and you will help them through the consequences IE likely charges, court, gaol time, life rebuilding etc.