In The Devil And Tom Walker, the author's purpose in writing is to warn against avarice and selfishness; he appeals to anyone who thinks that he/she can gamble the happiness of his/her life for shady gain. His message is that it does not pay to covet wealth at any cost.
In the story, Tom Walker makes a pact with Old Scratch/the Devil for Kidd the Pirate's treasure. Accordingly, Tom has to fulfill some conditions set by the Devil in exchange for access to such wealth. We are never told what those conditions are, but it is implied that it involves nothing less than complete surrender to the service of the sly Tempter.
When Tom takes his wife into his confidence, she begs him to accept the terms and conditions. Perversely, Tom refuses, for the sake of being contradictory. The couple quarrel long and hard about the affair. Eventually, Tom's wife makes her own deal with the Devil. One day, she absconds with all of the valuables the couple owns. When she is not heard from again, Tom goes looking for her. During his search at the Indian fort, he spies a bundle tied up in a checkered apron, hanging upon the branches of a tree. Tom is ecstatic, but this is not due to the knowledge that this bundle might provide him with clues of his wife's whereabouts. He just thinks that the bundle contains the household valuables his wife had taken with her.
When he climbs up the tree and gets a hold of the bundle, he discovers to his shock that it contains a heart and a liver. Shock gives way to unfettered joy when he realizes that the Devil has probably done him a great favor in dispatching his wife.
The story concludes with Tom fulfilling the terms of his agreement with the Devil and losing his life and his soul in the process. The author asserts that Tom disappears without a trace one day; all he has left to his name is an iron chest filled with wood-chips and shavings plus two skeletons in his stable. Sadly, his house also burns down to the ground not long after he disappears. The moral of the story is that it does not pay to be both parsimonious and covetous.