Found some good points that I support in your post. It isnt necessary to yell on the street "I am a gambler! I am a gambler!" But it also isnt necessary to cross the street or try to ignore the question "Do you gamble?" when somebody asks. I am not keeping in secret that I gamble. And I dont welcome people "Hello, my name is TopTort777 and I gamble". And you know what, I have never had any trouble or any kind of harassment from not hiding that I gamble. I see only disadvantages of hiding such hobby and see no advantages.
Btw, would gladly listen to any advantages of hiding gambling hobby. (opinion from those where gambling is illegal does not count).
I think it's influenced by the environment a person lives in and how their family views gambling. Some people can be very comfortable with not hiding that they are gamblers. But people who live in environments and families who consider gambling to be something bad will certainly not be comfortable if they do not hide their gambling habits. I personally am very uncomfortable when someone knows my account and checks my total bet. I experienced a loss on one of the gambling sites and my friend made fun of me for looking at my account. Because of that, I never publish my accounts to anyone.
I agree with you, everyone's decision will probably depend on the situation or that means someone will make a decision by looking first at what the situation is, if for example as you said that they live in a place or area that prohibits gambling then maybe the right decision for them to keep their gambling habits secret and vice versa if for example their environment is a gambling-free environment then maybe they will not keep it secret and maybe they even gamble openly without hiding.
Basically all decisions are in the hands of each gambler and we cannot force them to choose one of them between keeping it secret or publicizing it, because as we discussed that most likely someone makes a decision depending on how the situation is in their environment, like you where you prefer to keep it secret because you feel uncomfortable when someone mocks you, and it doesn't matter because everyone is free in terms of making the best decision according to them.