In general that's true, but since it's public, there has to be a balance. And benefits have to be factored into the overall pay as well.
You might be surprised to know that when you compare the percentage of people getting benefits in the public and private sector, many of them are equal. One that surprised me was health benefits. What I suspect a lot of people don't understand is that in recent years more and more employees in the public sector don't qualify for benefits such as health insurance or retirement plans because the can't get enough hours. Part time positions in the public sector are ever increasing. A lot of times fulltime positions have be split in to two or more part time positions.
Benefits are factored in when considering pay even when the position doesn't qualify for benefits. The way it is factored in is at the bargaining table. When employee groups bargain wages and benefits they frequently do so on behalf of full time employees instead of factoring in the reduced benefit cost for part time employees.
Unfortunately, nothing is ever as simple as it seems. I worked for a large public school district for about 30 years. When I started most classified employees working there made modest salaries and had good benefits. By the time I retired that hourly wages were still comparatively modest (often somewhat less than for comparable jobs in the private sector), but often the positions were part time ones with no benefits. For those qualifying for benefits, they were paying more out of pocket for their health care.
Currently there is talk of requiring public employees to contribute a larger portion towards their PERS (Public Employees Retirement System). In addition changes to PERS have resulted in large reductions in retirement benefits in recent years. It seems whenever the media wants to example how plush public employees benefits are they site someone who has been in the system, like me, for 30 years and thus was or is able to retire with higher benefits than most present and future retirees will have. The media also will pick someone like this fellow in Oregon who was a university coach and who was paid an enormous salary plus enhanced benefits which resulted in his getting an obscene retirement benefit of $40,000 a month. Of course these examples piss people off. Trust me, my retirement benefit after 30 years isn't even 10% of that figure and yet it is still much better than most retirees are getting.