If you are not confident enough to share your good and bad habits with someone you love, that's not a healthy relationship. But that's not the concern here. Keeping something a secret has many possibilities. It's not only because they are not proud of it, it's because people have different opinion on gambling. Some see this as a good thing, some as bad. And we can never know what the other person is thinking unless we discuss the whole thing with them.
For me tho, I will always tell my loved ones first. If the like it, then I will keep doing the thing. If not, then I'll never do it again. Gambling is meant for entertainment purposes. If not that, there are other ways of entertainment. I'll move towards those.
One important thing is, in bad situations, loved ones are the one who will come forward first. So it is important that they know about my gambling habit. Worst case scenario, if I ever get addicted to gambling, I will need help. For this reason, they should know. And there's nothing to hide.
Trust me, your loved ones are actually trying to keep you out of gambling because they know that you are going to lose money and temper. So maybe if you are gambling and if you are not confident, you should share it with your loved ones and they might give you a proper advice on what to do. Which I hope will be, not to gamble regularly. If you are a very rich person like Bill Gates or someone like that, I don’t have any problems, You are already very rich and you have money to throw around, you do whatever you like. But if you are not rich, and by rich I mean, at least a multi-millionaire, you should not gamble big money in my opinion.