If it was optional, you'd probably find a lot of people didn't take it- and probably a lot of them wouldn't have adequate private savings either. And eventually, these people will probably end up in a situation where they can no longer work, and have no money to live on. Most of them would end up in poverty, and would have difficulties with basic needs like food, health, accomodation, and so forth.
Now, you might say that is their right and we shouldn't override that. However, those people will ultimately put pressure on the government and taxpayer- poverty costs the state money, especially if we end up providing welfare or emergency accomodation for them. The government would rather not have to worry about that sort of problem, so instead we have a social security system.
The government is currently following a similar system with healthcare- it might be people's choice to not have health insurance, but if those people get sick and go to the ER, that costs the government a lot of money (hospitals legally have to treat ER patients whoever they are, and if uninsured they can get payment from the government). To reduce that cost, the government is trying to expand healthcare coverage so that sort of thing doesn't happen- except in this case it has mandated everyone get private insurance, as opposed to increasing public coverage.