OK, take Brok Turner, the rapist. People justified him because he was a priviledged white man who also was good at sports. The reason people didn't tried to understand why he did what he did is because they simply denied the evidence. They minimized it as 5 minutes of action. Understanding why someone in a position of power do bad things, is basically confronting some uncomfortable truths. And people with power preffer to just deny it.
Compare that with a poor young black boy who steals. We kind of understand that his situation leads him to that.
I compared two cis boys but with different circunstances. The more power in the social scale, the more you'll find denial instead of understanding.
Also, certain crimes are given more pass than others. A poor biy stealing would get less pass than goldman and sach investors stealing way more money and taking hundreds of families livehood.
I've looked and apparently, women get harsher sentences when their behaviour violate sex-role stereotypes. And here an article about women sentences.
But I suspect that the more social power you have, the more understanding you get. With rich people at the top.