The story
According to a widely repeated jocular explanation, “it [makes] those who [drink] it inclined to climb a tree,”; but the term is more plausibly explained by the fact that “squirrels were often drowned in the open-air mash-tubs used by moonshiners” and/or that the liquor was aged “by tying the keg in a tall pine tree”.
Etymology from Wiktionary, CC BY-SA 4.0.