When social security was first implemented in the 1930’s, America was a very different country. Especially in regards to demographics. The average life expectancy was roughly 18 years younger than it is now, and birth rates were a bit higher than they are now. By the 1950’s, the fertility rate was twice as high as it is in the 21st century.
In other words, for the first few decades, social security seemed very sustainable. Most people would only live long enough to benefit from it for a few years, and there was an abundance of young workers who could pay into the system.