In case you missed it, Huck questions absolutely everything. He doesn't accept religion or the law or racism at face value. Rather, he examines them and comes to his own conclusions about what is right. Tom, on the other hand, follows rules to the letter. He never wonders if it is right to make some poor man stay away from his family and sleep with snakes and rats, because he's following the rules of adventure that he's read in books. Tom helps us see that Huck is the true moral center of this book. Thanks, Tom! And maybe get your nose out of a book, okay?
Buck and Huck are approximately the same age, have similar names, and take to each another right away. And for good reason. Buck is raised by a wealthy and allegedly aristocratic family, whereas Huck comes from a poor upbringing by an alcoholic and abusive dad. The Grangerfords should be refined and well educated, but in fact they're feuding with another family for no clear reason. This wouldn't be so bad if people didn't die from their ridiculous argument. Thanks to Buck, we learn that upbringing, class, and status aren't everything—and maybe civilization isn't so great, either.
Every road movie needs a sidekick, and Huck has Jim. He provides comedy (all those ridiculous superstitious); support (taking over the night watches); and even provides an important moral lesson just when Huck needs it. What more could a river-loving kid ask for?