If you mean that alcohol is not generally prescribed by doctors to treat an issue, you are often correct outside of things like wiping before giving yourself an insulin shot.
However, many people use alcohol to self-medicate for legitimate issues. The fewer services available to you, the more appealing alcohol and other drugs seem. Alcohol is, after all, cheap and readily available.
Sometimes it is as simple as trying to be able to withstand a cold, wet night. Sometimes folks are in pain (a variety of things can cause this, from tooth decay to sore feet to serious issues). If you cannot afford psychiatric medications, alcohol is a way out. It might not be ideal, but it is available. More available than health care in many cases. After all, you are speaking of folks that don't have actual shelter, a proper toilet, sanitary conditions, or a place to store or cook food regularly.
I'll add that simply being homeless can be a deadly condition as can a myriad of things that you might go to the doctor for. Seriously, if you simply couldn't get anything to treat your condition, what do you think your options would be? What if daily life made you absolutely miserable and you couldn't find a way out?