There's no one stopping you from keeping your life secret when it comes to your gambling life. It is your life, so how you live with it, is all on you. So long you are not stepping on anyone's life, you can do what you want for your life. Most of the time, it is best to keep your gambling activities to yourself esp if you are only playing online. Less talk, less trouble, more peace of mind for yourself.
Well, keeping your gambling life a secret is an individual decision to make and that would be something that would be motivated by maybe the environment in which that person lives or his personality. and other things that one may not have in mind now.
Environmental factor in the sense that there are people who live in environments where gambling has been heavily crucified and since that is the case people who gamble in such environments have tried as much as possible to live a low-key gambling life and in terms of personality there are people who are private by nature so for that reason they decide to keep their gambling life a secret.
Aside from those two things I don't think there is anything tangible that would make somebody to keep his gambling life a secret because it doesn't really matter if it remained to be secret or not.