One problem is the binary of "sober".
Opioid substitution therapy has a long track record of effectiveness, but when treating homeless addicts we all too often insist they go through withdrawal, to nobody's benefit. Not all homeless are addicts, but an individual suffering opioid addiction has very different behavior from someone who isn't, and that requires particular attention. Opioids have the worst relapse rate of all addictive drugs.
Stimulant withdrawal on the other hand is generally less severe, and acute stimulant intoxication is more likely to cause serious behavioral problems than with opioids (or methadone). Cocaine has a surprisingly low relapse rate, once sobriety is maintained for a few months.
Alcohol is a little more difficult, because it not only has a dangerous withdrawal syndrome but it also causes aggressive or impulsive behavior. Treating withdrawal is imperative; substitution is difficult, since other anxiolytics can produce the same impulse control problems. Access to alcohol is pervasive, as well, and we would like to avoid constant monitoring.
When we see only the possibilities of permissiveness or restriction and not active and detailed intervention, we are not playing with a full deck. As another commenter mentioned, simply allowing shelter residents to use drugs creates risks to other residents and staff. But we should be as accommodating as reasonably achievable.