Neural nets are pattern recognition and repetition machines - nothing more or less.
If black people have historically been given harsher punishments by the criminal justice system (duh), any neural net is going to pattern match and print out a heavier sentence for a black person based on its training data.