The purpose of the current system is to make the benefits one receives sort of proportional to the income they earn. Of course it's the government taking in money and spending it, and it's all one government if you zoom out, but it's still useful to categorize certain funds.
Instead we have a weird situation where the tax specifically calls out social security, but in reality gets spent on a bunch of unrelated things, with a thin veneer of technicality to make it all hold together.
EDIT: This is not correct. It appears they have borrowed against the SS fund using treasuries, which will have to be back. Or phrased another way - the SS system chose to invest in US debt.
https://www.ssa.gov/policy/docs/chartbooks/fast_facts/2019/f...
https://www.ssa.gov/agency/performance/
And I don't know of a debt instrument that can be exited more easily than US Treasuries:
https://www.ssa.gov/news/press/factsheets/WhatAreTheTrust.ht...
This interview with a prominent actuary who worked in the Social Security admin is also very helpful to clarify the workings of SS:
https://us14.campaign-archive.com/?u=bd0d1b66f832083794c33c9...