Since I do not have information about the possibility of inheriting these behaviors from parents to children, the most likely hypothesis is that one of them is influenced by the other, in which the younger is often influenced by the older, in what resembles a kind of curiosity. This is called the pathological effect, which is similar to the state of infection in organic diseases.
I have a friend who became addicted to gambling because he was influenced by his father, who is also addicted to gambling, even though the father never plays in front of his children (he is addicted to gambling and playing card games with his gambling friends), but the son grew up and found that his father had a bad reputation as a gambling addict, so he decided to become like him. The father can't stop him after finding out about his son. I find that these are indeed tragedies that the addict may cause without realizing it himself.
with the case that you tell about about a child who inherited the behavior of his father who was a gambler, and in my opinion it is true that the saying that the fruit does not fall far from the tree, even though his father did not gamble in front of him, but when his character has declined, so will his father's behavior. will pass on to their children. Also, currently there is a lot of online gambling circulating and with the current reality that most people cannot be far from their cellphones and the internet, of course this also makes it possible for everyone to be familiar with gambling and if they are interested then there is a possibility that they could become addicted to gambling.
Sometimes what's annoying is the impact of gambling which can spread to other people who don't know anything, especially the family, in one family there is someone who is addicted to gambling so it's very likely that as time goes by the family who don't know anything about it will be affected perhaps from finances which could lead to arguments that could destroy initially good family relationships.