Huck takes friendship so seriously that he's willing to swear blood oaths on it. Worse, he's willing to risk eternal damnation—because that's what he thinks awaits him for helping Jim escape. But, once he realizes that Jim is his friend, he can't do anything else. Huck values loyalty more than anything else, so he sticks with Jim to the end. (Now that's a status you can like.) But we have to ask: if Huckleberry Finn values friendship so highly, why does Huck ditch everyone and everything he knows at the end?
The self-serving friendship acts as a foil to the selfless friendship between Huck and Jim.
Huck and Jim's friendship isn't actually a real friendship; it's always affected by Jim's race.