The immediate reason that several major government agencies are currently shut down is that President Trump decided to draw a line in the sand over funding for a wall on the border with Mexico. But the reason that those agencies are shuttered now relates to the federal budget calendar — and that Trump advocated for this fight at this moment itself derives from the evolution of political rhetoric in Washington.

In January, when the federal government shut down for more than a week, we walked through how the process for government funding works. Each department submits a budget, and Congress determines how much money will be appropriated for that department in a given fiscal year. (The fiscal year runs from Oct. 1 to Sept. 30, meaning that fiscal 2019 began several months ago.) Congress will either approve a new appropriations bill for each department or pass one bill — an “omnibus” — approving all outstanding appropriations requests.

Such bills aren’t always easy to pass. Often, Congress will pass continuing resolutions (or “CRs”) that preserve existing funding while new appropriations levels are hammered out. In recent years, it has been common for the first few months of a fiscal year to be covered under a continuing resolution, holding funding at the prior year’s level for a set amount of time. Occasionally, those CRs extend well into the fiscal year; in several cases recently, they’ve been extended to cover entire fiscal years.

This is what the recent pattern looks like.

This chart assumes that the government will remain shut down until the new Congress is sworn in later this week.

Those blue bars could be broken out into numerous parts. It’s common for multiple continuing resolutions to be passed at the start of a given fiscal year, as Congress allocates itself a certain number of days to come up with a full appropriations package and then hits that deadline without success. The choice then is either to pass a new CR — or to let the government go unfunded. To shut down.

You’ll notice there that while the federal government has shut down in its entirety or partially three times in 2018, that was during two different fiscal years. In each of those three cases, continuing resolutions expired before new CRs or fuller appropriations legislation could pass. That leaves government departments unfunded — and so those departments shut down (however literally that happens).

It’s worth comparing the two longest shutdowns. In each case, the shutdown was spurred by Republicans hoping to use a shutdown as leverage to get Democrats to take an action that the left opposed. The shutdown in October 2013 (at the beginning of fiscal 2014) was an effort by Republican lawmakers to block funding for the Affordable Care Act. The most recent shutdown, as noted above, was spurred by Trump’s push for wall funding, in which he was joined by House Republicans.

That shutdown in January 2018, though, was also about trying to force an opponent’s hand. It was prompted by a Democratic effort to force the Senate to consider legislation that would protect immigrants who came to the country illegally as minors.

Shutdowns, in other words, have increasingly become ways of demonstrating to party bases that congressional delegations are doing everything in their power to enact changes that the base demands. Republican voters wanted to block Obamacare in 2013, so Republicans shut the government down. Democrats wanted to protect immigrants who were covered under President Barack Obama’s Deferred Action for Childhood Arrivals program, so Democrats shut the government down. Trump’s base wants a wall, so Trump shut the government down.

Much of this overlaps with the decline in compromise on Capitol Hill. Much overlaps with the increase in political polarization among the congressional delegations. Much overlaps with the discrepancy between perceived power — control of both chambers of Congress — and actual power, which almost always depends on some support from the minority.

Combine those factors with the beginning-of-a-fiscal-year need to pass appropriations bills, and a shutdown is what you get.

Later this week, power on Capitol Hill will shift. House Democrats are prepared to introduce legislation that would reopen all of the government, at least temporarily. It seems unlikely, though, that the threat of future shutdowns in this or other fiscal years will have declined to any significant extent.