Really? How about this: trying becoming homeless, and then try finding and keeping a job while being homeless. Seeing as how you can't wash and iron your clothes, and the only bath you can take is probably at a sink in a McDonald's restroom, it's pretty doggone hard for a homeless person to ever get and keep a job. Yet so many just look at them with scorn, telling them, "go get a job."
That's what providing an apartment allows them to do: take a shower, wash and iron clothes - even clothes from Goodwill, if they're clean and pressed, looks a heck of a lot more presentable (and job-worthy) than just what a homeless person has on his or her back.
Also, you're going on the assumption that if we give them a place to live, they'll suddenly become lazy. But if you'll check, most people want the dignity of a job. If a person's been on the streets, most of them would love the opportunity to get a job, to be able to do for themselves. YES, there will be some who will take advantage of the situation - the modern-day version of 'welfare queens'...but the great majority just need the opportunity to be able to get a job, as menial as that job may be...because even the most menial jobs are out of the reach of those who are homeless.