Social programs often compensate for massive distortion in the economy. For example, SNAP benefits both the poor and the businesses where SNAP funds is spent on, but that's because a lot of unearned income goes to landowners, while preventing people from employing laborers and starting businesses. SNAP merely ameliorate a situation that shouldn't had arise in the first place.
So, yes, reasons other than efficiency explain why people aren't working, as well why there are still poor people.