House Bill 2, North Carolina’s controversial law best known for restricting bathroom access for transgender individuals, has cost the state millions of dollars, hundreds of jobs, numerous entertainment and sporting events and, arguably, one Republican governor.

Yet, despite those costs — and the price of attracting national scorn — the GOP lawmakers who rammed HB2 into law last March can’t seem to quit it.

This week, a deal to reverse the measure in exchange for the repeal of a local nondiscrimination ordinance in Charlotte fell through, prompting widespread disappointment and outrage once again.

For months, HB2 backers have been saying that the only way to repeal the law would be to undo the Charlotte anti-discrimination ordinance that prompted its passage in the first place. So why — after the Charlotte city council held up its end of the bargain — would North Carolina’s GOP-controlled legislature continue to ignore what is clearly in the best economic interests of the state?

Simple, say several experts on Tar Heel politics: Because they can.

"Ninety percent of lawmakers who supported HB2 either ran uncontested this fall or won the last election by a comfortable double-digit margin," said Bob Phillips, executive director of the nonpartisan group Common Cause North Carolina. "Essentially, they are unaccountable to the voters."

Hunter Schafer, of Raleigh, holds a sign in favor of repealing North Carolina HB2 during a special session of the North Carolina General Assembly in Raleigh, N.C., Dec. 21. Ben McKeown / AP

With its first GOP-controlled legislature in a century carefully installed back in 2010, North Carolina began its rapid transformation from a reliably moderate, pro-business southern state to a testing ground for far-right, social-conservative policies.

Over their years in power, Republican lawmakers in North Carolina have cut education funding, restricted access to abortion, implemented strict barriers to voting, refused the Affordable Care Act’s Medicaid expansion, ushered in fracking and, most recently, imposed anti-LGBT regulations on government building bathroom use.

The rightward shift has angered many: Hundreds of people have been arrested in weekly “Moral Monday” protests at the State Legislative Building in Raleigh.

Yet the electoral consequences have been limited.

Republican Gov. Pat McCrory only narrowly lost his reelection bid to the state’s Democratic Attorney General Roy Cooper last month.

And Republicans were able to maintain veto-proof super-majorities in both houses of the state legislature, which quickly moved to strip Cooper of some of the powers he would have had going into office.

Several experts say a big reason the state's Republican lawmakers can get away with such divisive behavior goes back to 2010, when — with the backing of retail magnate Art Pope — they took control of the legislature and quickly redrew the state’s electoral districts in a way that made it virtually impossible to lose their grip on power.

"The fact is that the primary audience for most of the GOP statehouse members are pretty right of center," said Andrew Reynolds, political science professor at UNC Chapel Hill.

"Their immediate need is to assuage and appeal to old style conservative voters in the south. They don’t need to be moderate; they don’t need to appeal to crossover voters or Independents,” he added. “The way districting works in North Carolina, which is emblematic of the country’s worst problems, is that you’re beholden to a very parochial conservative district for your reelection.”

Lawmakers confer during a negotiations on the floor of North Carolina's State Senate chamber as they meet to consider repealing the controversial HB 2 law, Dec. 21. JONATHAN DRAKE / Reuters

North Carolina was rated one of the most gerrymandered states in a 2014 Washington Post analysis, and several of its districts have since been ruled unconstitutional in federal court.

Earlier this month, the U.S. Supreme Court heard oral arguments in a challenge to two of North Carolina’s congressional districts, which plaintiffs argue are packed with black voters to diminish their strength in other districts.

In a separate case, a federal court last month ordered North Carolina lawmakers to redraw 28 state House and Senate districts on the grounds that they were racially gerrymandered. The court also mandated that the state hold special primary and general elections in the fall of 2017.

Assuming that that ruling is upheld on appeal, some Republican lawmakers could finally end up paying a political price for their unpopular behavior — including reneging on the deal to repeal HB2.

Even so, the legislature’s partisan dynamics likely won’t change much. Best case scenario for Democrats, experts say, is that Republicans lose their veto-proof majorities — and even that’s not a guarantee.

"You can still gerrymander pretty darn well without taking race explicitly into account," said Steven Greene, political science professor at NC State University, adding that there is typically low turnout in an odd-year election. “The only hope [for HB2 critics] is that enough social conservative Republicans are like, ‘Let’s just do away with this and go back to living normal lives.’”

Others are more optimistic.

"I think Republicans are holding the state hostage, and as we go to the polls we’ll see people fight back and make sure they pay the price at the ballot box," said Kimberly Reynolds, executive director of the North Carolina Democratic Party. "We can commit to undoing the harm they have caused and we will make sure people know that."