This is basically a manifestation of harm reduction. I was just reading about this in Gabor Mate's book "In the realm of hungry ghosts."
There are many things that can and should be done to facilitate the essence of harm reduction, but this is just one of them.
The idea, in layman's terms, is to provide the addict with a safe and loving environment, so that they could in turn have the support available to possibly not succumb to the rhythms and stress they have learned living on the street, so to speak. By limiting the addicts exposure to life threatening diseases, or in the case with crack pipes, exposure to harmful toxins that shorten the life-span of the addict (or even that toxic glass exploding in their face from overuse), you are thus performing harm reduction. IMHO there is nowhere near enough funding or focus on this in our society- so taxes? I'd gladly pay them, personally. Where else or how else will harm reduction ever be adopted into our society?
It is also an inert and positive atmosphere that lets the addict know it is OK they are addicted. No one is going to blatantly judge them for being addicted at these facilities, much unlike the way they are viewed by society as a whole. Another factor that has been shown to help in recovery.