You're right to point out the hypocrisy. I think it's a combination of two things. First, society uses shame to try to keep people in line with what the general social mores are. It works because people tend to fear what they do not understand. For drug use, propaganda has been circulated ever since drugs first became illegal to try to demonize them and also their users. Think Reefer Madness, where people were told that marijuana users become out of control rapists and murderers. A lot of people believed that so it's not hard to see why people looked down on drug users. They knew nothing about marijuana, except the lies they were told, which were specifically designed to produce fear. Although things have improved a lot (especially for marijuana), these ideas born from a lack of understanding are still affecting people today. For suicide, it makes even more sense, because suicide is terrifying for people who love those who do it. Someone who is not suicidal cannot understand why someone would do that to the people they love (that is their perception anyway), so there is a lot of fear involved. It's the kind of fear that causes people to forget their nice ideals about how one should act. It's easy to tell your child who is being bullied at school to not listen to the bullies. It's not so easy to have compassion for someone who has caused you or someone you care about a lot of pain, be it through drug addiction, suicide, or anything else.
I think another aspect that is a factor for some is the same schoolyard mentality that causes bullying as children. People aren't satisfied with their own selves/lives, and a quick and easy way to feel better is to compare yourself favorably to some other person or group of people. So I think some people that treat drug users like scum are using it to make themselves feel better about their own life... ie, "yeah, but at least I'm not a fucking druggie".