Twain's story is a frame structure--a story within a story--and it fits well with Twain's style of writing which often includes an outsider's or traveler's point of view. His collection Innocents Abroad maintains the same theme of a supposed objective observer describing what he sees and whom he meets.
Most likely, Twain created Wheeler's character to add "local color" to his tale. Twain as a American Regionalist writer relied heavily on dialect and curious traditions of small towns and outposts to add humor and satire to his works--in this story Wheeler provides both elements. The narrator is a rather nondescript character who would not be able to provide background information on Calaveras County or "local color." In this tale, he is the objective traveller who allows Twain to give his readers brief glimpses into a variety of eccentric "Western" towns and customs.