Symbolism, Imagery, Allegory
That's right, treasure: a big box of gold coins. Hidden in a "haunted house." Then brought to a cave and hidden again. Right under a cross. A cross. Also known as an X. That's right, in The Adventures of Tom Sawyer, X does indeed mark the spot. Twain might as well be winking at us. He takes the biggest pirate/treasure related cliché, the kind of thing that make-believe pros like Tom wouldn't even think about, and uses it. The bridge between Tom's fantasy life and real life is blurred.
The sheer awesomeness of Tom and Huck's discovery is so great that, once reality sinks in and the money has been locked away in the bank, the ending doesn't seem so happy after all. Huck says it best when he tells Tom, "[B]eing rich ain't what it's cracked up to be. It's just worry and worry, and sweat and sweat, and a-wishing you was dead all the time" (35.9). Tom and Huck do live the dream, but they also have to live through the morning after. Is this some kind of metaphor for the disillusionment that comes at the end of childhood? Maybe. Maybe not. Either way, it feels authentic.