During the story, Tom makes a deal with the devil. The devil gives to Tom a considerable treasure, and in exchange, Tom agrees to give his soul to the devil. The devil fulfills his part of the deal, and at the end of the story, he arrives to take Tom's soul in exchange.
At the end of the story, Tom is sitting in his counting-house, about to foreclose on a mortgage which will in turn financially ruin a man for whom Tom had previously "professed the greatest friendship." By this point in the story, Tom is a deeply immoral, selfish man. He adds to his fortune by exploiting and ruining people. He has become obsessed with money and lives only to increase his own wealth. It is therefore very appropriate that Tom should be in his counting-house when the devil arrives for him, to take his soul.
One of the speculators who Tom has exploited angrily exclaims to Tom, "You have made so much money out of me." Tom replies, unthinkingly and untruthfully, "The devil take me ... if I have made a farthing!" At this very moment, ironically, the devil knocks three times at the door of the counting-house. Tom understands that the devil has come for him, and he realizes, too late, that he has left his Bibles "at the bottom of his coat-pocket and ... on the desk buried under the mortgage he was about to foreclose."
The locations of the Bibles are significant because they are out of reach for Tom. At this very moment, he needs the Bibles to ward off the devil. Indeed, earlier in the story we are told that, after Tom made the deal with the devil, he always made sure to have his Bibles close at hand, "That he might not be taken unawares."