Few things are inevitable in Congress, but passing massive spending during a time of record deficits is probably one of them.

Late Friday night, the House agreed to changes made by their Senate colleagues, sending a $1.2 trillion infrastructure package to President Joe Biden’s desk after months of debate. Despite much palace intrigue and handwringing, our leaders managed to do what they do best: authorize spending a lot more of our money.

The vote was mostly along party lines, with a baker’s dozen Republicans crossing the aisle in support of the package — much to the chagrin of their conservative colleagues. With contentious midterms closing in, some Republicans wanted to tout their adeptness at bringing home the bacon to more moderate districts.

The bill itself is not all bad and contains far more actual infrastructure than many Republicans have been willing to let on. Nearly half of its total spending will go toward proverbial roads and bridges, with the remainder spent on everything else: trains, planes, dams and, yes, even broadband — arguably the most important form of “transportation” for many Americans who commute daily on video calls.

While many Republicans have implied that the bill spends little on actual infrastructure, this confusion stems from conflating the bill’s new spending with its total cost. But that still doesn’t mean the package is wise or responsible.

For one, no fiscal legislation occurs in a vacuum, and the current budgetary landscape could not be bleaker. The federal budget ballooned due to record spending on COVID-19 relief, among many other things. The last year and a half has hardly been a paragon of fiscal prudence.

To add what will assuredly be trillions more in spending, once some version of the Democrats’ social spending bill passes via reconciliation, is nothing short of irresponsible at a time when inflation — however temporary — continues to rear its ugly head.

Of course, many will argue that infrastructure is a proper role of government, right up there with national defense. True or not, this assessment — and much of the recent public debate — glosses over whether such a function is the proper role of the federal government.

“Most infrastructure spending comes directly from state and local governments,” as a recent primer from USAFacts points out. The condition of bridges and highways is hardly crumbling under this arrangement, annual alarmism by the American Society of Civil Engineers notwithstanding.

To the degree that the federal government should play a role in infrastructure improvement, it is through block granting funding to states, letting them determine how best to spend such resources on individual needs.

There is substantial room for improvement in this regard — revamping the currently inefficient and politically driven allocation formula would be a great start — but the latest bill doubles down on that flawed arrangement while tossing funding at new things that may not work either.

Putting together a reconciliation package that will satisfy swing votes Senators Kyrsten Sinema and Joe Manchin would be hard enough in normal times. It promises to be even more difficult with the dual threats of a government shutdown and the need for a debt ceiling increase still looming on the horizon.

But for now, Democrats can take a win — one they believe came too late to salvage their political prospects in Virginia but that may still help them in next year’s midterms. That likely will depend more on the state of the economy than on this latest package or any further legislation to come. But Democrats feel they need to have something — anything — to sell to the American people.

Fair or not, supply chain disruptions, shortages and inflation — all hardships that are more properly blamed on the last Congress and administration — will now be Democrats’ burdens to bear, though passing unwise spending packages after the fiscal wreckage of the Trump years is unlikely to go unnoticed, no matter what.

Jonathan Bydlak is the director of the Governance Program at the R Street Institute, a center-right think tank.