The question itself feels like it calls for "Schoolhouse Rock" level basics about how the federal government works.
The federal government does not work like a private escrow account where a fee collected for X automatically goes to Y. Tax revenue comes in to the Treasury, and Congress decides what agencies are allowed to spend. So even if TSA screening is funded in part by a per-ticket user fee, TSA still does not get to just collect that money and use it directly. Congress has to authorize and appropriate it.
On a practical level, imagine the chaos if every federal department acted as its own tax collector and then set its own spending priorities. That is basically an argument for gutting Congress's oversight of TSA and treating it like an independent agency, just because Congress and the executive branch invented the modern shutdown in the 1980s.
Keep in mind shutdowns are a fairly new concept, that nearly no other country has. The US also didn't have it for most of its history. Congress could stop at any time it wanted.
You’re right that that’s the default state. However, Congress could have set things up such that the fees would pass through to TSA’s budget (i.e. earmarked) but chose not to.
Many are run by user fees, such as USCIS that keeps operating during shutdowns.
SFO doesn’t use TSA for security and works like this with whatever contractor it hire. I wish all airports would just use private security funded via usage fees, then we would never be held hostage because some whacko wanted to use masked thugs to beat up and shoot Americans.