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?