Shame is social stigma, and sure you can be fearful of it, but it's not the same thing: being in the closet is/was mostly about fear for yourself of hard repercussions - disownment by parents (if young), getting physically attacked, that kind of thing.
> Shame is social stigma, and sure you can be fearful of it, but it's not the same thing:
Fear (of shame itself, and/or of the concrete social consequences for yourself or others of shame that you might be subject to) is the entirety of the mechanism bt which shame acts as an influence on behavior.
> being in the closet is/was mostly about fear for yourself of hard repercussions - disownment by parents (if young), getting physically attacked, that kind of thing.
Yes, that's how shame as a social constraint works. There has never been a society in which shame worked as a social constraint without there existing hard social consequences, from ostracism (including exclusion from the material support mechanisms available to others in society) to outright honor killings, for having shame attach to you.
Not sure why people in this thread are romanticizing societies that center shame more than the modern West.
Fear of the material consequences of social stigma is part of how shame in culture constrains behavior. It may not always involve the subjects of those consequences sharing the cultural indoctrination on which the shame is based (though, contrary to your description that tried to nearly separate it, LGBTQ people being closed often did—and still does, that phenomenon isn't purely in the past).
So is people imposing those material consequences because shame also attaches to those in social proximity to the trait to which society attaches primary shame, such as family members of those openly tolerant of it. Which is a big part of the source of the fear of consequences.