Story highlights For the first time in years, leaders agree on a full budget plan

Republicans want to avoid another government shutdown and focus on Obamacare

Democrats can still brand Republicans as the shutdown party due to October

Bureaucrats, politicians and the economy benefit from the funding certainty

(CNN) -- The words "budget" and "compromise" haven't been connected in Congress in recent years.

But legislators stunned observers and perhaps each other this week when Republicans and Democrats proved that they can, indeed, agree on government spending.

Republican Rep. Paul Ryan and Democratic Sen. Patty Murray worked out a budget framework to fund the government into 2015.

The House approved the compromise agreement Thursday. The measure now goes to the Senate, where it is expected to pass as early as next week. The White House supports the proposal.

It was the first full budget agreement by a divided Congress -- in which different parties control the House and Senate -- since 1986, Ryan boasted in announcing the deal.

After years of bruising political fights over spending and the federal borrowing limit, dysfunction reigned supreme in October when the government shut down for 16 days.

A short-term spending plan got it going again, but a CNN/ORC International poll found that 71% of Americans thought another shutdown would occur when the money ran out in January.

Instead, such repeated budget brinksmanship would be put on hold if Congress passes the Ryan-Murray proposal. While neither side loves the compromise legislation, it appears to be on a path to approval.

So, what changed this time?

Republican leaders stood up

For two years, the most conservative members of the Republican Party, with the help of outside conservative groups, have been driving the agenda in the GOP-led House.

JUST WATCHED Boehner at war with conservative groups Replay More Videos ... MUST WATCH Boehner at war with conservative groups 02:26

JUST WATCHED We're going to hold people accountable Replay More Videos ... MUST WATCH We're going to hold people accountable 02:53

JUST WATCHED A rift in the Democratic Party? Replay More Videos ... MUST WATCH A rift in the Democratic Party? 02:34

House Speaker John Boehner endured humiliating leadership lapses when he was unable to corral sufficient votes from his majority caucus for legislation and agreements opposed by the tea party wing.

The government shutdown in October was apparently the last straw.

Led by tea party conservatives, Republicans forced a showdown over their demand to dismantle Obamacare. When Democrats balked, the public blamed the GOP for the dysfunction.

Plummeting poll numbers emboldened Boehner and other establishment Republicans to assert their leadership this time by defying conservative opposition to the budget agreement.

In particular, Boehner has blamed outside conservative groups that exert influence on Republican politics for pushing GOP legislators into the politically disastrous government shutdown in October.

"The day before the government re-opened, one of these groups stood up and said 'well, we never really thought it would work,'" he told reporters Thursday before animatedly asking: "Are you kidding me?"

At the same time, Boehner and other GOP leaders want to keep the political focus on problems with Obamacare, such as the botched launch of the HealthCare.gov website and policy cancellations despite President Barack Obama's promise that people could keep coverage they liked.

In defense of defense

In general, members of Congress hated the untargeted forced spending cuts known as sequestration from a 2011 agreement, albeit for different reasons.

Democrats disliked the indiscriminate nature of the dramatic spending reductions, with priorities such as education and social programs targeted equally with other less-valued categories. Republicans, meanwhile, opposed the deep cuts to military spending that top generals said weakened America's defense readiness.

The budget deal would eliminate $45 billion worth of sequester cuts set to hit in January, as well as another $18 billion scheduled for 2015.

Defense Secretary Chuck Hagel praised the agreement Thursday, saying it provided certainty for military planning.

"This agreement does not solve all (Department of Defense) budget problems but it helps address readiness especially in 2014 with putting more money back in training, in particular, and procurement," said Hagel, a former Republican senator.

"It also gives us some new certainty, predictability for our planning, for our budgeting over the next two years which is particularly important," he added.

No one likes Congress

Years of dysfunction have really torpedoed the public's view of Congress.

After the October government shutdown, a CNN/ORC International poll showed only 14% of respondents expressed satisfaction with how the government was operating.

By comparison, 26% of people were dissatisfied with the government during the Watergate scandal.

Congress was under pressure from the public as well as the business community, including the influential Chamber of Commerce, which warned that another manufactured government crisis would harm the economy.

Perhaps lawmakers are sick of being the least popular kids in town.

Democrats don't want to be blamed

Republicans got the most blame for the October shutdown, and Democrats want to make that a permanent association in the mind of the public.

House Minority Leader Nancy Pelosi told CNN on Thursday that the anti-government tea party wing had sullied the GOP brand.

"In many ways, those people have hijacked the name Republican, which has been such a valuable contribution to our country, the Republican Party," the California Democrat said. "But they've taken it over the cliff."

With congressional elections coming up next year, Democrats want to ensure that voters think of Republicans whenever the word shutdown comes up.

Agreeing to the budget plan avoids the possibility of another shutdown until at least 2015, preserving the negative connotation for Republicans through the next election cycle.

Certainty at last

Actually passing a formal budget for the first time in several years benefits everyone.

Congress returns to what leaders call "regular order" on the budget, meaning spending proposals are debated and passed instead of the practice in recent years of merely authorizing spending at previous levels.

Bureaucrats can develop strategies and plans based on known figures, rather than wallowing in uncertainty over how much money the bickering legislators finally would authorize.

Legislators up for re-election next year can campaign on their political and fiscal philosophies and accomplishments -- such as passing a budget -- instead of engaging in spending showdowns that anger voters and hinder economic growth.

"I came here to cut the size of government. That's exactly what this bill does," Boehner said Thursday of the budget deal.

Meanwhile, Pelosi made sure to point out that passing the budget agreement would require Democratic votes because too many Republicans oppose it for the majority party to push it through on its own.

"They haven't passed anything with their own votes that was any good for the country," she said.