Since any understanding of civilization, culture, and society depends on understanding the history that lead to it. It's like asking why "The Red Badge of Courage" has to have all that icky bloodshed in it.
The whole point of "Huckleberry Finn" is that Huck stops seeing Jim as a lowly "nigger" and realizes that he is his best friend and the best human he knows. Huck overcomes the matrix of the society around him.
How beautiful. I think I'm gonna cry.
Have you read the Red Badge of Courage?