That's a sign of irresponsibility, and that person can be a threat to the company, for example if I happen to have a company where we have everything to do with accounting, if I noticed that one of my employees is into gambling he will probably take some stupid risks in the future using money from the company, there are many cases of frauds like this from workers around the world.
I will surely sack him, even if you have a gambling addiction you should avoid gambling at work, you don't know who is watching, go home and fall into your addiction again, not at the office, you are risking your job it seems.
Of course you would have fired him if you had found out about his addiction, apparently his mistake was that somehow it became known, otherwise he would have continued working for this company until now and it would not have been a problem for anyone.
Especially since it was mentioned that he never gambled during working hours and it did not harm his work in any way. I think that it is possible to combine work and gambling so that it would not be a hindrance to either family or work, especially if he could make a profit from gambling.