From the Document: "The military retirement system is a government-funded system that provides a defined benefit to all retirees and matching government contributions to the Thrift Savings Plan (TSP) for eligible servicemembers. It has historically been viewed as a significant retention incentive for military personnel. The system includes monthly compensation for qualified active and reserve retirees, disability benefits for those deemed medically unfit to serve, and a survivor annuity program for the eligible survivors of deceased retirees. The amount of compensation depends on years of service (YOS), basic pay at retirement, and annual Cost-of-Living-Adjustments (COLAs). [...] The non-disability military retirement system for active-duty members has evolved since the late 1800s to meet four main goals.  To keep the military forces of the United States young and vigorous and ensure promotion opportunities for younger members.  To enable the armed forces to remain competitive with private-sector employers and the federal Civil Service.  To provide a reserve pool of experienced military manpower as a 'retired reserve' that can be recalled to active duty in time of war or national emergency.  To provide economic security for former members of the armed forces during their old age."
CRS In Focus, IF10483
Congressional Research Service: https://crsreports.congress.gov/