I don't think you should hide anything from your spouse, and that includes gambling too. Gambling addiction is bad on its own, then hiding it from your partner is a betrayal. Gambling has to do with your finance, so it's very important you share it with your partner, so you both can even make a budget for it, so it does not affect your finances.
Hiding your gambling habit from your partner could lead to divorce, when they find out that you have been hiding it from them. They will definitely feel betrayed and it's really going to affect their trust for you, and when trust is broken in a relationship, it's might lead to a divorce.
It depends but in general I agree that everything will be disclosed to our partner since both their finances is involved once they are married due to sharing of wealth law.
I said it depends because sometimes our partner can’t handle this activity even if you are gambling moderately and you have full control to your expenses.
If I’m doing okay on gambling while my partner has tendency to not accept what I’m doing I think I will choose to hide my gambling activity but not the addiction.