The thing is, peers aren't always right. In many cases the masses impose their self-centered views on arbitrary topics. It's not always about something as self-destructive as hard drugs, or even self-destructive at all.
You might live in a highly religious community but have LGBT+ feelings. You might wish to enjoy playing games though your community feels those are for kids. You might like particular kinks that others are frowning upon.
Feeling ashamed because of others' judgment in those cases is purely self-deprecating and holding the person back from truly finding themselves.
In many cases resistance to shame is a great thing and promotes diversity. Avoiding hard drugs is not even a matter of shame but the lack of realisation that a person is destroying themself.