I don't think it should be assumed that the homelessness is caused by the addiction, rather than both being comorbid to some third condition. Certainly some homelessness is caused by addiction, but for some a mental illness could be the cause of the homelessness and the drug-use may be an attempt to self-medicate that mental illness. In that scenario, providing clean and safe heroin would improve their quality of life, but wouldn't address the underlying condition or the subsequent homelessness. The family living next to the tent city will probably still feel pretty upset about the state of things.
The family living next to the tent city will be much happier without its property being constantly broken into ($300 window repair for the sin of leaving $5 in change in the cup holder), or the other acts that the opioid-dependent are willing to do to avoid withdrawals.