Advertising and availability. Sports gambling was limited to Vegas a decade ago, now you can lose thousands of dollars while fiddling with your phone on your toilet.
If every corner store and gas station had a heroin vending machine, you'd probably see a lot more opiate addicts, too, regardless of how well the economy is doing. And doubtlessly, their owners would screech to the skies at any attempt to curb that shit.
Consider the example of a person who has been trapped by a malevolent aggressor in some sort of detention they find miserable. The de facto prison that they live in is surrounded by barbed wire fences, snipers, and angry dogs.
They're considering whether or not they should try to run through those perils. A clever, urbane economist comes up to them and tries to explain to them about cost-benefit analysis, wants to talk to them about the expected value of their decision, and the chances of death and all of that, how to make a rational decision.
That person is a fucking idiot. Because, from the perspective of the person making the actual decision, it's a binary outcome: accept a life of unending misery or do something, anything, to improve it.
There is nothing at all irrational about running into almost certain death when imprisoned unjustly. And there's nothing irrational about extremely risky behavior when your current life is miserable and there aren't enough levers to pull to get out of it by other means.
For the most part, the kind of people who write those books find themselves very popular and well-supported by the kinds of people who build those prisons.