The government. Understand, they don't replace your investments, but if you become destitute you go on various welfare programs, food stamps, medicaid, etc.
That's why social security should remain in relatively risk free investments. The only reason for a government enforced savings program like SSA is to keep people from becoming destitute and dependent on the government. And then individual's private investments should make up the difference in quality of life.
But it should be run like a savings program and not a transfer program.