When Tom fakes his death, he tells his aunt that he dreamed that he saw her mourning his death.
When Tom and the “pirates” do not return after the storm, the town assumes they are dead. Tom takes advantage of it, pretending to be dead and allowing the funerals to happen. When Tom returns and Aunt Polly asks him if he ever thought about her, he explains that he dreamt about her reaction to his “death.”
“Why, Wednesday night I dreamt that you was sitting over there by the bed, and Sid was sitting by the woodbox, and Mary next to him.” (ch 18)
Aunt Polly notes that she is glad Tom’s dreams “could take even that much trouble about us.” Of course, Tom did not dream it. He really did look in on the family, watching them react to his death. Tom’s “scheme to return home with his brother pirates and attend their own funerals” works well for him, because he sees how much his aunt loves him. However, he does cause her pain –but he feels bad about it.
Tom is a trouble maker, but it’s all in good fun. He never actually intends to hurt anyone. He is a good boy with a big heart, and he just happens to be good at mischief-making.