In addition to the ideas above, I'd point to the fact that Jim has a family and Huck does not. Huck has run away from his father. Jim has attempted to run away from slavery with an eye to getting his wife and children and moving somewhere that they can be together. This contrast between Huck and Jim may inform some of Huck's willingness to sacrifice his conscience to keep Jim free.
Remorse is not a characteristic of people without highly developed morals. Again, contrary to the stereotypical slave, who was thought to be little more than an animal, Jim suffers from pangs of conscience over his act of meanness to his daughter, Elizabeth. Clearly, throughout Twain's novel, there is an integrity and wisdom in Jim that surpasses most, if not all, of the other male characters.
It also contributes to Huck's realization that Jim is the same as he is, regardless of his color. Huck has been told his entire life that black people don't feel, think, dream, or care about others as white people do. This story along with Jim's plan for his future (how he will first get a job, buy his wife, and then they will both work to buy the children) illustrate to Huck that Jim is worthy of freedom and friendship just as any other man on earth is.
To me, it really shows us how human Jim is. Twain uses him for comic effect a lot, with his superstitions and such. But it is episodes like this that remind us how human he is.
I think this is meant also to point out to us how badly other people treat Jim -- they treat him like he's not human. Twain is emphasizing his humanity as a way to point this out, I think.