But some people don't try. They don't want to try. If given a choice between a free shack and a nice home they can work to afford, they will choose the shack. How do we get them to contribute something positive to society, and to take the risks that the safety net is intended to promote?
If you were content with your life, and someone was shouting that you ought to be more ambitious because of some principle they hold, how would you view them? Some people prefer to live in a shack because it solves a problem. For example, they may be paranoid or OCD, and not needing to work for a living cuts their stress tenfold. They may be hated by the nearby populace (racism, classism, religious prejudice, etc), and not courageous enough to go searching the country for a place where they belong. In each of these cases, trying to force them to work normally (or expecting incentives to work and thinking badly of them when they don't) is arguably the wrong choice.
In these circumstances, people are not contributing positively only because other factors are contributing negatively. If you want positive contributions, you have to solve their problems first, whether that's teaching them to solve their own problems, or incentivizing others to help them.
And by the way, saying "They don't try. They don't want to try." is expecting incentives to work, and thinking badly of people when they don't. There are a lot of things "I don't want to try because", which is different from "I don't want to try period." Some of them are curable fears, anxieties, etc. Some of them are based on opinions. Some are just cultural ignorance. But more often than you seem to give credit for, those reasons are, well, reasonable.