Every parent will definitely feel like they have failed if their child steals just because they want to gamble or do something they should do as a child. As a parent, you are obliged to show an attitude that your child can emulate, sometimes as a parent who likes to gamble, you can't control it. When he gambles, he is not even embarrassed to gamble in front of his children, which will certainly set an example for them indirectly. As a parent who is self-aware that gambling is a habit, he should know how to arrange gambling time at night, precisely when the children are asleep. , don't let it be too late to advise and teach our children.
Then we would better stop on a conclusion that both, parent and kid are guilty and failed. It is not only kid that needs to be punished, he is not the only one to think about what he did. Parents should get cautions about their parenting either. Something went wrong in their "being a parent coordinate system". If my kid steal from me, first things I would think about are why he need money for and why he has chosen such path, instead of asking or earning for example.