Social security is guaranteed by the federal government. Making social security into 401k only benefits corporations by giving them a guaranteed funding source.
Hell, I hate the fact that companies moved from a pension system to 401k. Social Security is one of the last places where we have guaranteed income.
Social Security is adjusted for inflation and provides a predictable income stream you can plan for. Having it tied to the stock or bond market would result in big swings and also potential loss. Social Security isn't maximized for profit, it's maximized for predictability.
Plus you could leave it to your heirs if you don't spend it all, whereas your heirs over age 18 get nothing from SS after you die except a laughable few hundred for funeral expenses.
Paul Krugman has an excellent book that spends the first few chapters discussing social security and the GOP's dream of privatizing it called, Arguing With Zombies. I recommend checking it out, it covers a lot of US economic topics and dispels many myths.
But really, much of the drama around SS is very overblown. A small reform of increasing SS tax from 12.4% to 14.4% will fund the program for the next 75 years. Source: https://www.ssa.gov/policy/docs/ssb/v70n3/v70n3p111.html
The reason it's even having a funding issue in 12 years is due to Congress (primarily the GOP) refusing to make the necessary reforms. They want it to fail because they want to privatize it, which Paul Krugman's book goes into great detail about. Additionally, the average birthrate in the US went from 3 children per woman to 2 children, meaning there are less people paying in than before. And again, this is easily fixed by simply raising the tax by 2% (or lowering benefits by 13%), which the link I provided earlier discusses.
Getting rid/allowing people to opt out of SS is a terrible idea. Yes, many folks could take that money and have a better return. However, the majority of people would not. And what would happen when they're disabled or retirement age? They'd be fucking broke and have zero savings. Guess what happens then? Mass crime. Crime like you've never before seen in the US. Social programs have proven time after time to be more effective at preventing homelessness and crime than any other government policy. Getting rid of it or even allowing people to opt out would 100% backfire on society at large.