We can only obey the rules if we want to still work in that company. We can't risk our job by doing something that is prohibited by the company. Besides that written rules, we should care about the unwritten rules that may be not allowing us to do something. It is better we work carefully so nothing bad will happen to us and we don't get any problems. But if we do something by coincidence, maybe the company can forgive us but they will give a warning not to do the same thing in the future. So if we can be careful while we work, we can be a good employee and the company may reward us with something good.
Have you read the article? That fired person wasnt gambling at work or during work, but the reason to fire him was gambling. I have never heard that any company has "any form of gambling is forbidden everywhere" kind of rule. For example, if gambling at home is not acceptable by company, then this is a total nonsense.