Employees, both in the private and public sector, often get complicated pay packages that include monthly salaries, pension entitlements through different schemes, medical benefits, and other allowances. In many parts of Europe, the public sector pay contains a higher percentage of deferred entitlements and a lower percentage of immediate cash payouts. An engineer or lawyer in the public sector often earns less than a similar qualification in private practice would, but they get job security and future payouts ...
This is similar to big property holders effectively self-insuring. A company with a thousand buildings might not take fire insurance because their own pool of risks is diverse enough that damages should even out over short timeframes -- no need to pay the overhead and profits of an insurance company. The public sector can afford to "self-insure" the retirement of their employees by paying less now and more later.
In a way that sounds logical. One trusts the public sector to pay pensions 30 or 50 years from now, where private companies would be asked to pay immediately into some sort of more or less secured pension scheme, or directly to the employee who invests himself/herself.
In another way, such things can get out of balance if average life expectancies change and pension ages do not keep up, or if the average pension entitlement in the private sector changes.