As the previous post suggested, the conflict with society that always results when either of the two leave the river is an important part of Twain's commentary on society. Of course you also have to consider the run-in with the thieves on the river and the danger of that situation. In this case it would appear, if you are assuming that each part of the story has an attached meaning, that the river also takes care of its own problems in a way as the thieves are drowned after Huck leaves the boat with them trapped inside.
Twain's outlook on society in general is cynical and critical almost to a fault. His description of American society is filled with criticisms of the government, of common people and their ignorance, percieved or otherwise. He tends to think of people that are outside of these normal, "civilised" places as being more capable, more interesting, and at times happier, just as Huck and Jim appear to live a happy and uncomplicated life while on the river and get into all kinds of trouble once they go on shore.
The idea of the King being an accepted part of society is a great example of society and civilization being portrayed in a negative light, but so too is the fact that Huck is so often able to outsmart and outwit "civilized" people, demonstrating that his training and education is at least as valid and useful as that of civilization.