system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What is a government shutdown, and how does it happen/work?
gpt
It's important that we make the distinction between the civil service and elected officials.  The civil service is government employees, there are hundreds of thousands of them and they are the nuts and bolts of making the government actually function.  They are the worker bees, the doors, they are the people who push paper and the bureaucrats. The president, as the head of the executive, is the leader of the civil service.  While he's elected most civil servants are not. 

Then there are the elected officials, the legislative branch.  There are only a few hundred of them and they have quite a bit of power.  They pass laws, they decide how much you will be taxed, they decide how that tax money is to be spent.

By law, the civil servants cannot spend government money without the legislative branch passing a bill each year saying how much money goes to what activities. 

So if the legislative branch fails to pass this bill, the civil servants are not permitted to spend any public money, not one cent. The managers can't pay the underlings, the department heads can't pay the managers and even the department heads don't get paid.  Since it's not legal to require someone to come to work when you can't pay them (that would be slavery) the civil servants are told to all stay home.

Without those hundreds of thousands of civil servants, the government grinds to a halt.   If the government can't pay park rangers, they can't open the national parks, and so on and so on.  People on food stamps don't get their benefits because there's no one there to process the payments.  Social security cheques stop because there's no postman to deliver them and even if there was there's no employee stuffing the envelopes or signing the cheques.

So a government shutdown happens because congress (the legislative branch) can't or won't pass a bill allowing the civil servants to spend money and be paid.  Therefore they don't come to work, therefore nothing gets done. 

There are some special exceptions for critical services.  But most services the government provides are critical to the people that get them.  So it's only the REALLY critical stuff that gets an exemption.