It takes good, motivated staff to run an effective government department. Those same people have a lot of options, so the government has to compete for them somehow.
We’re unwilling to pay them high salaries (take a look at the federal pay scales: GS-12, which is usually a scientist with a grad degree, starts at $66k). Benefits seem a little more politically palatable, so the government competes on those instead: we won’t pay you a lot, but you can earn a (slightly) better retirement instead.
Without either, who’s going to work for the government? Do you really want a government full of people who can’t land any other job?
When an existing employee retires or otherwise ends their employment with the state, don't hire a replacement unless that job is critical to the operation of the government.
It's not clear what the actual pensions number is, but the total budget for absolutely everything for the two years 2019-21 for Oregon appears to be $82bn from Schedule VI of https://www.oregon.gov/das/Financial/Documents/2019-21_gb.pd...
I tried to find the same for California, but it seems they do a better job of hiding it.
My point is that we are spending a tremendous amount of money on former government employees, so they can have nice homes, good healthcare, and a quality education for their children. But in the process, we're neglecting a large portion of the population that those people were supposed to be serving.