Hello
Most time it's for fill an psychological void and /or for don't see the reality. Unless they want to avoid themselves, or a part of themselves. They also may try to stop their huge anxiety and of course, that works ' only ' for a very short time. Or even these three things at the same time, it's depending people and their personal story and personality.
Also, some people drink, while some others have eating disorders, use drug(s) etc... In fact these abnormal behaviors are a symptom of something that happens inside their psyche (feel an empty that they don't bear, although this psychological void is necessary, etc.. The things I mentioned more up ).
Once the person knows what creates the need to drink and / or eat / take drug etc.. Relived the circumstances that are unconscious for them, the symptom(s) stops. At the end of the Psychoanalysis or even before, what was unconscious for them and make them have all the symptoms I described, become conscious. The anxiety anxiety created by all these unconscious things disappears as well.
Best
** Sorry for my bad english, as it is not my mother language and too, I summarized a lot, otherwise it could be very long to explain all this.