The primary purpose of social programs is to provide social stability. Bismark implemented one of the first social security systems because it proved the only effective tactic to removing the support base for marxists and anarchist. The poverty ridden lifestyle of a 19th century factory worker was bad enough that any kind of change seemed better. Having a minimum standard of living removed the desperation that makes revolution attractive and more importantly gave the common worker a reason to be invested in the status quo. Less radical but equally important, having less destitute people also limits crime.
There is a reason that every modern nation with a decent economy has some kind of social programs, they are an absolute requirement to a successful nation state.