I think it is a natural thing that our close family members get concerned about bad habits of acitivities we have and whenever they find about them. they try to warn us sometime with love and sometime rudely because they reallly care about us.
And this is also a reason why people keep their gambling habits secrets to close relatives because they know these are the people who try to stop them. while others might not care about that.
But, it still feels better if you know that someone has your back if you are in trouble. I mean, if ever I cross that line, I know she will be there to stop me.
It's also a good thing that she knows, that way I will be afraid to lose all my money because of being afraid that she might scold me.
Keep it a secret to your neighbors to avoid gossip and so that kids won't know it from someone else. It's best they won't have any idea of gambling while they are still young which is why we keep it a secret to other people. But if it is your wife, I doubt she will tell that to the kids as long as your still together.
As explained by @danherbias07, the wife needs to know so that she can stop when she is too deep. because indeed when we play gambling, it is not uncommon for the mind to be very chaotic and uncontrollable. That is what causes large losses and defeat.