Still does not make sense for me to ask that gambling-related question even though the job was within the Accounting field.
Mostly, questions should be related to accounting-related works. That was the most important question to be asked and not the employee's life in reality.
Even if an employee has a gambling-related problem, it doesn't mean that person is totally doomed and can't work well during office house. What if that person is still responsible and disciplined and more likely can still do his job properly without a problem? That's the thing that the employer should look at not those other things not related to work.
Anyway, I don't even know if the such situation really happened. Never in my life have I heard that employers, HR department, or those who are assigned as an interviewer asked such a thing in an interview.