On Tuesday the Senate did something that no one had a right to expect: It passed a significant piece of legislation — a bill that will spend $1.2 trillion over 10 years to shore up the country’s ailing infrastructure — with bipartisan support.

In this case, we’re using the term “bipartisan” loosely: Most of the Senate’s 50 Republicans voted no. Still, the fact that 19 Republicans voted in favor of a bill that will count as a victory for President Biden was genuinely surprising, and seems to contradict the widespread prediction (including mine) that the GOP would erect an impenetrable wall of obstruction against any major Biden legislative wins.

Why did this happen, and what does it tell us about the next couple of years?

The party’s incentives and individual senators’ incentives are not always the same. As a group, Republicans have a strong incentive to see Biden fail. That would make it more likely they’ll take back control of one or both houses of Congress in 2022, which is why Senate Minority Leader Mitch McConnell (R-Ky.) has been executing essentially the same obstruction strategy he used when Barack Obama was president.

But at certain times, an individual lawmaker might benefit from doing something that’s not in the interest of their party. Sometimes that means taking a more moderate position, and sometimes it means the opposite. But in this case, enough senators decided that passing a large infrastructure bill — which will allow them to say they’re delivering tangible benefits to their constituents — was in their interests.

Still, it’s complicated. In many cases, such as that of chief Republican negotiator Sen. Rob Portman (R-Ohio), the supporters are lawmakers who have already announced their retirement and are insulated from political backlash. In others, such as Sen. Mitt Romney (R-Utah), they’ve built bipartisanship into their political brand. For others, those incentives couldn’t overcome the fear of backlash from the right. That’s why Sens. Todd C. Young (R-Ind.) and Jerry Moran (R-Kan.), who face reelection in 2022, participated in bipartisan negotiations but then announced their opposition, as did Sen. Mike Rounds of South Dakota.

Among Republicans up for reelection in 2022, only Sens. Lisa Murkowski of Alaska (a moderate who wins with support from Democrats and independents) and Charles E. Grassley of Iowa (who will soon turn 88 and may not run again) voted in favor.

The key GOP constituency — big business — wants this bill. Republicans may feed their base a steady diet of manufactured culture-war controversies, but when it comes time to write laws, few things matter more to them than the opinions of the business interests that fund their campaigns.

Those interests are now eager for the government to spend on the infrastructure on which they depend, which is why this bill is backed by the U.S. Chamber of Commerce, the Business Roundtable and the National Association of Manufacturers, as well as many influential CEOs. Those aren’t people Republicans say no to very often.

Donald Trump barely tried to stop it. Had the former president planned and executed a strategy to pressure Republican senators not to support the bill, he might have swayed a few votes. He opposed this bill, but it so clearly reflected personal bitterness at seeing his successor accomplish something that some Republicans were able to stand up to him.

The core of his failure was that he didn’t give a good enough reason for Republicans to fight the bill. If politicians are going to get people worked up to support a political goal, they have to offer a compelling substantive rationale. Even if their real purpose is to deny the president a victory, that won’t get people flooding the congressional phone lines.

Trump criticized the bill on political grounds — he said that it would be “a big victory for the Democrats and will be used against Republicans in the upcoming elections” — but didn’t bother to articulate a substantive critique. Which is why we saw Sen. Kevin Cramer (R-N.D.), an extremely Trumpy Republican, explain his support by saying that Trump “didn’t give one reason why it’s a bad deal, other than it’s Joe Biden’s.”

This bill is a one-off. If there is any piece of legislation Biden wanted and Republicans might vote for, this is it. It gives direct help to every one of their states. The more ideologically weighted pieces — immigration, support for child care, and so on — have mostly been shunted off to the much larger reconciliation bill Congress will take up next. And it allows them to say that, like everyone else, they support the idea of bipartisanship, at least in principle.

They also know, as does McConnell, that voters have very short memories. The midterm elections are over a year away, and by the time they arrive Republicans will still be able to cast Biden as a contemptible failure who should be punished by delivering Congress into Republican hands.

And don’t forget, most Republican senators voted against this bill. Nearly all Republicans in the House will probably vote no as well. And the unique combination of factors that produced this victory for Biden are unlikely to come together again.

The GOP’s calculation is that it can let this bill pass and still accomplish its goal of taking back Congress, then really make Biden’s life hell for as long as he remains in office. It is probably right. But for now we can be glad that something worthwhile happened in Congress.