The latest lesson in unintended consequences comes to us from the American tobacco industry. According to recent numbers, 2016 tobacco sales topped $117 billion—up more than $40 billion from 2001. The overall sales are more than twice as much as the equivalent amount for beer sales in the States.

As the Wall Street Journal reports, Big Tobacco’s good fortunes seem all the more remarkable when considered against the backdrop of years of bad press and the tight squeeze of regulatory costs. In 1998, the tobacco industry’s ‘Big Four’— Philip Morris Inc., R. J. Reynolds, Brown & Williamson, and Lorillard— reached an agreement with 46 state attorneys general according to which ongoing public health lawsuits were dropped and companies were granted certain exemptions from private tort liability. In exchange, the companies agreed to a raft of marketing and sponsorship restrictions as well as a collective penalty fee of roughly $10 billion paid annually to the states.

Even under the terms of the 1998 deal, tobacco companies still faced potentially billions of dollars in liabilities. Taxes on cigarettes have only gone up in recent years, and rates of smoking have dropped by about ten per cent in the last ten years.

So whence the record windfall for tobacco companies in 2016?

The answer, as the WSJ points out, lies in the simple fact that tobacco sales are driven less by the “traditional laws of supply and demand” than they are by the guarantee that a large base of customers will buy the product at almost any price. When governments slap the industry with taxes, then, rather than discouraging sales, they are contributing directly to increased profits. In 2016 the average cost to buy a pack of Marlboros was about $6.31—of that only 18% went to cover manufacturing costs, with 17% going to retail markup and 42% a result of taxes. That leaves about 20% of pure profit for the companies. In addition to beefing up profits, this regulatory insulation discourages smaller manufacturers from moving up in the market, as they struggle to meet the onerous legal requirements and high cost of business.

Quite apart from the relative merits of tobacco regulation—on which opinions rightly differ—this story proves a case-study in how both the market and government attempts to control it are subject to ‘soft’ cultural factors quite beyond their control. Until and unless an effort emerges from within civil society to discourage tobacco sales, the lesson of the last ten years seems to be that regulation alone isn’t up to the task.