It had a noble goal: to help elderly and disabled Americans, who can't work, maintain a minimal, dignified living standard.
Back then, most people either died before reaching that point or didn't live long after it. Social Security was never intended to do what we now expect, i.e., be the primary income source for most Americans during a decade or more of retirement.
Life expectancy when Social Security began was around 56. The designers made 65 the full retirement age because it was well past normal life expectancy.
No one foresaw the various medical and technological advances that let more people reach that age and a great deal more, or the giant baby boom that would occur after World War II, or the sharp drop in birth rates in the 1960s, thanks to artificial birth control.
Those factors produced a system that simply doesn't work.
A few modest changes back then might have avoided today's challenge. But now, we are left with a crazy system that rewards earlier generations at the expense of later ones.