This is true, we have the ability to house every homeless person. There are more second vacation homes than homeless people. Why not just move them in? I'm not even talking about the ones available for rent - just the ones sitting there empty.
Baxter, A. J., Tweed, E. J., Katikireddi, S. V., & Thomson, H. (2019). Effects of Housing First approaches on health and well-being of adults who are homeless or at risk of homelessness: systematic review and meta-analysis of randomised controlled trials. J Epidemiol Community Health, 73(5), 379-387.
For a homeless person who is not addicted, sharing the shelter with the addicted ones means constant worry that even the little stuff they own gets stolen the moment they stop paying attention, and also lack of sleep because of the constant screaming and fighting during the night.