The Louisiana State Lottery, founded in the 1860s, was among the first of its kind. It operated by mail and drew players from across the country, with a nickname—the Octopus—that reflected its wide reach and strong hold on politicians. Early on, the company obtained a state charter that prohibited other lotteries from forming. When the public clamored against this monopoly, the company enlisted as a spokesman the Confederate general Jubal Early, who offered a novel argument: if lotteries were so evil, it was better that there be only one of them. Congress felt differently, dissolving the Octopus in 1890. Its corruption left the public so wary that no state would touch a lottery again until the 1960s.

In the interim, an underground culture blossomed to cater to the public’s continuing hunger for the numbers game. These lotteries operated mostly in poor urban neighborhoods, and while illegal, they generally enjoyed the cooperation of law enforcement. “Established operators in the South Side and Harlem reached an understanding with authorities that included the voting power of their districts,” Sweeney writes. “When things were running smoothly between the policy kings, the police, and the politicians, signs hung in windows announcing the daily draws.”

The task Sweeney has set himself—explaining how this all came to be—has one formidable challenge: the legislation and lobbying, the taxes and state government budgets can make for rather dull reading. The result is that his exhaustive research is occasionally at odds with his storytelling. (The lottery business, he concedes, “is as much about negotiating the intricacies of state bylaws and access to those with control over contracts as it is about gambling and new technologies.”) Still, these foot-dragging passages are perpetrated in the service of a greater purpose: to bring into deep focus a single, familiar aspect of American culture, and to tell a story that most people, be they ticket scratchers or not, didn’t know was there.

Gregory Beyer is a journalist whose work has appeared in The New York Times and the Los Angeles Times.