A pharmacist collects medications for prescriptions. (Simon Dawson/Bloomberg)

The high cost of prescription drugs is on everyone’s agenda. In more than 40 states, pharma-related bills are pending or recently passed. President Trump, Health and Human Services Secretary Alex Azar, Food and Drug Administration Commissioner Scott Gottlieb and the Centers for Medicare and Medicaid Services have advanced proposals to bring down prices. Congress passed an anti-gag clause bill, letting pharmacists give more information to patients to help them save on costs.

It is no surprise that public officials, hearing the drumbeat of complaints from the public, are scrambling to get a handle on the problem. Drug prices have risen at an alarming rate in recent years, outpacing all other aspects of health-care spending, including nursing home costs.

Specialty drugs lead the way with eye-popping price tags — current therapies for hemophilia are priced at $580,000 to $800,000 a year; Novartis plans a $475,000 price tag for its Car-T drug Kymriah, which treats non-Hodgkin’s lymphoma.

But it is not just prices for new drugs and rare conditions that are causing so much pain. Pharmaceutical companies have raised prices most sharply for commonly used medications to treat diabetes, high cholesterol and asthma.

How did we get here? The answer can be found in this country’s shadowy and byzantine system for negotiating drug prices and rebate deals. The system contains odd and perverse incentives, with the result that higher-priced drugs can receive more favorable health-plan coverage, channeling patients toward more expensive drugs.

At the heart of the system lies the industry known as pharmacy benefit managers (PBMs). Historically, PBMs operated mostly as claims processors. Although the industry experienced significant shifts in the 1990s when claims processing moved to the digital world, the real transformation took place in 2006. In that year, prescription drug coverage became part of Medicare, introducing a massive influx of patients with prescription drug coverage into the market. PBMs took on an additional role for a wide range of health plans: helping plans set formularies (the terms on which patients can access drugs) and negotiating prices with drug companies. The rise in prices that followed has been dramatic. Between 2006 and 2014, prices for drugs rose by an average of 57 percent, and prices for drugs with no generic substitutes rose by 142 percent.

What caused the increases?

Here is how our current system works. It starts with a structure that looks healthy on the surface. Health plans pay their PBMs based on the extent of the discount that a PBM can negotiate with individual drug companies. In theory, this should encourage the PBM to drive prices down. After all, entities should bargain hard when their pay is tied to how much of a discount they can negotiate.

The problem? Drug companies raised their prices so they could give a greater discount. This increases how much of a “discount” the PBM can claim to have negotiated, and the payout to the PBM. It is a little like a department store raising prices right before a sale so the sale discount looks more appealing.

All of this might not be so bad if no one paid the high list price. But many people do. Many plans make patients pay full drug costs until they meet their deductible, and other plans require coinsurance — both of which are based on the list price. Many people still do not have coverage for prescription drugs, even if they have health insurance. Thus, people are forced to pay the full price at various times. Worse yet, the entire structure encourages drug companies to compete not by cutting prices but by offering higher prices.

Pharmaceutical companies offer the same types of rebate deals to hospitals, to clinics that administer medication and to doctors who deliver medication such as injections or infusions in their offices. The hospital or other facility charges the patient a higher list price and then receives a rebate later from the drug company, ultimately pocketing the difference. And they also provide other types of payments under labels like “administrative fees” and “data fees.” If policymakers try to reduce or eliminate rebates, drug companies can still provide payments to everyone in the distribution chain by shifting that flow of money to other types of fees.

The name of the game is volume. The more volume a drug company has with a particular PBM or hospital, the better deal it can offer as a temptation to exclude rival drugs. It is a little like Budweiser going to a bar owner with the following offer: “Okay, at the end of the year, I’ll pay you 50 cents a bottle if you’ve sold 40,000 bottles of Bud. Better yet, I’ll make it $1 a bottle if you don’t put any of that microbrewery’s beer on the menu.” If the microbrewery starts out by selling a limited number of bottles, how could it ever compete? The little guy could never offer enough off the price on its few beers to compensate for the tens of thousands of dollars the bar owner would forgo by rejecting Budweiser’s offer.

These rebate spreads and other fees are clearly incentives to prescribe the drug. In exchange for lucrative payments, a drug company can ensure that more expensive drugs receive a more favorable reimbursement position and less expensive drugs are shut out. This narrows prescription choices and undermines competition from generic drugs and from other drugs within the same class of medications that might provide excellent results at a lower price.

In 2013, when the Supreme Court handed down a decision that cast doubt on the drug companies’ practice of paying generic competitors to stay off the market, drug companies doubled down on other strategies designed to hobble generics, including these rebate schemes.

Government also plays a role. Many of these drugs are protected by strong patents and other exclusivity rights that give the company a monopoly over the market. Drug companies apply for these benefits in a variety of ways, including by performing pediatric testing, pursuing other new clinical studies, developing so-called orphan drugs and creating drugs for tropical diseases. Companies can manipulate this rights system to their advantage during negotiations with hospitals, doctors and health plans. For example, a government-protected monopoly can be used to arrange protection for other drugs that are facing competition.

Recent real-world examples of this cycle of market manipulation abound. For example, in October 2017, Shire sued Allergan alleging that Allergan used bundled rebates to preserve the dominant market share of its blockbuster dry-eye medication, Restasis. In addition to the company’s monopoly position in the dry-eye medication market, the company controlled the market for glaucoma drugs, for which no generic drugs were available.

When the FDA approved a new drug in the dry-eye market, the company offered a plan in which attractive deals in the glaucoma market would be available for those who also gave favorable treatment to the company’s dry-eye medication. According to one Medicare plan administrator quoted in the complaint, given Allergan’s bundling scheme, a competitor could give the new drug away free and the numbers still wouldn’t work.

What does all of this mean? Patents and exclusivities are intended to incentivize innovation in the drug industry, providing a time-limited monopoly to recoup costs followed by vigorous competition to bring the price down to competitive levels. Instead, drug companies are manipulating the system, often recycling and repurposing drugs rather than inventing new ones. In fact, 78 percent of the drugs associated with new patents were not new drugs coming on the market but existing ones. The cycle of innovation, reward, then competition is being distorted into a system of innovation, reward, then more reward.

At the end of the day, drug companies are able to use financial incentives to ensure that as lower-priced alternatives enter the market, they cannot gain much of a foothold. The companies have simply found a way to operate within the system to their own greatest advantage. Can one really expect anything different from profit-making enterprises?

Unfortunately, it is lose-lose for the rest of us. Manufacturers raise the price, and at least some patients pay the higher price. With those who don’t, the money created by the rebate spreads to the middle players — PBMs, hospitals and doctors — who then extend competition-free zones for the drug company’s drug. In the short term, society pays more in the form of higher prices; in the long term, society pays more in the form of fewer competitors to offer lower-priced drugs. Today and tomorrow, society pays and pays again.

The pharmaceutical industry has introduced extraordinary health-care advances. One cannot overemphasize the major life improvements over the past century that flow from innovation in prescription medications, including new lifesaving antibiotics, treatments for pain, psychopharmacological treatments and cancer drugs. As one physician pointed out to me, former president Jimmy Carter has already lived several years beyond his diagnosis of metastatic cancer, thanks to a drug that did not exist a decade ago. However, if we don’t get a handle on the perverse incentives operating throughout the system, we may be pricing ourselves and our economy into oblivion.