The answer to this question is at the beginning of Chaper 13. His "adventures" so far have just gotten him in trouble. His aunt is angry with him because he fed pain medication to the cat, and Becky, when she returns to school, speaks scornfully to him after he tries to get her attention by showing off. He sees himself as "gloomy and desperate" (98). He believe nobody loves him, and so he sets out "to lead a life of crime (98). When he meets his friend Joe, Joe's idea to escape their troubles is for them to become hermits. But Tom persuades Joe that there are "conspicuous advantages" to becoming pirates, and that is what they decide to do. Then they went to find Huckleberry Finn, who was happy to become a pirate, too. They had no idea what kind of crimes they would commit as pirates, but they decided to start out at midnight on the river bank.