"The most expensive hospital in America is not set amid the swaying palm trees of Beverly Hills or the luxury townhouses of New York’s Upper East Side," Julie Creswell, Barry Meier and Jo Craven McGinty wrote last week in the New York Times. "It is in a faded blue-collar town 11 miles from Midtown Manhattan."

Bayonne Hopsital Center in Northern New Jersey tends to charge higher prices than any other hospital in the country, according to the new data trove that Medicare made public earlier this month. For example, while the average hospital charges $23,518 to treat congestive heart failure, Bayonne charges $121,080.

Medicare does not pay the really high prices that Bayonne–or any other hospitals, for that matter–charge. For congestive heart failure, for example, Medicare paid the hospital an average of $7,170. That's less than 6 percent of what the hospital billed.

Why do hospitals like Bayonne set absurdly high prices, ones that insurers and Medicare will never actually pay? One explanation I've gotten from hospitals is that it's all about the "chargemaster," a master-list of prices that determines the prices for everything the hospital does, from transplanting a lung to providing a piece of gauze.

“The chargemaster can be confusing because it’s highly variable and generally not what a consumer would pay,” Carol Steinberg, vice president at the American Hospital Association, told me when I reported on the new Medicare data. “Even an uninsured person isn’t always paying the chargemaster rate.”

In other words, the chargemaster price is likely irrelevant to most patients. But at Bayonne, Creswell, Meier and McGinty found another reason that may compel hospitals to set the high prices they know they won't get paid.

"Until a recent ruling by the Internal Revenue Service, for instance, a hospital could use the higher prices when calculating the amount of charity care it was providing, Gerard Anderson, director of the Center for Hospital Finance and Management at Johns Hopkins," said in the New York Times story. 'There is a method to the madness, though it is still madness,' Mr. Anderson said."

Charity care is incredibly important to facilities like Bayonne Hospital Center, which needs to demonstrate that it provides a high level of "community benefit" in order to maintain its status as a nonprofit hospital. The higher prices that a hospital charges, the bigger amount of charity care its providing.

At least, until this year. In April, the Internal Revenue Service issued new regulations under the Affordable Care Act that change the way hospitals demonstrate "community benefit." Among other changes, the new regulations requires hospitals to charge uninsured patients a rate that not more than the "amounts generally billed" to patients with insurance coverage.

Bayonne had other motivations for setting high prices, and it's worth reading the New York Times article in full to get a better understanding of those. It's a helpful reminder that even when hospitals know they won't get paid their full prices there is still, as Anderson put it, a method to the pricing madness.