Actually it is a system that works wonders for 1 generation or unless there is a population increase. Basically, in stage one, people pay in and people who have never paid in get a check. That works wonders for 1 generation. It is the ultimate free lunch. After that, you have people who pay in and expect something back. Total failure occurs in "the last generation" which would be if no more kids were born or in the case of a population decrease where there would be recipients but no payers.
The popularity of social security is the for the last 50 years, the 1st timers got a wonderful deal and the population has doubled too so that the 2nd timers are ok too.
The end of the good deal is coming as I don't think we can double our population again.
This is also why the increase in the national debt has not been a problem yet. A person can borrow, but must eventually pay back the principle by the time he dies. Since a country never dies, it never has to pay back, but only must pay interest. This is another case of the good deal working once.