Agency goals are to improve morale and motivate employees. The deferred gratification keeps the focus on the career and on the team, and prevents fraud and corruption. Benefits maintain loyalty to the civil service rather than a political party. They prevent claims against the civil service. Sovereign immunity is a thing of the past.
Benefits avoid or postpone taxation.
Some are tax exempt, because they are paid by the employer, for example health insurance. Some are only tax deferred, such as the employer contribution to retirement. Individuals can spread risk for life insurance and health insurance for big expenses. Risk spreading does not make as much sense for medical expenses that are routine such as dental or vision care. Nevertheless these items are frequently covered.