Back in November 2006, Eduardo Castro-Wright, who was then the US president of Walmart, dispatched the company’s jet to pick up marketing head Julie Roehm in Chicago. She arrived late, in an ice storm, but made it in to the Walmart headquarters, where Castro-Wright started grilling her on the agency review process: how she had picked DraftFCB as the agency which would take over Walmart’s $1 billion-per-year account. Roehm had interviewed some 30 agencies before settling on Draft; the questions centered on whether she had allowed any of those agencies to pay for dinner while she was talking to them, and whether she had accepted a lift in the car of any of the agencies’ CEOs.

Four days later, Roehm was fired, for violations of Walmart’s extremely strict ethics policy. As Walmart expert Charles Fishman explains,

Wal-Mart had a kind of unbending almost obsessive adherence to even the trivialist elements of an ethical code. They’re a brutal competitor and everybody acknowledged that, but Wal-Mart was also the company that wouldn’t take a dinner from you, that wouldn’t let you provide a soda if you went to meet them to talk about business, where they wouldn’t join trade associations for many, many years because they didn’t want to pay dues and have a conflict of interest.

We now know, of course, that Castro-Wright was the man at the very center of the Walmex corruption scandal. Which raises the obvious question: did the corruption at Walmex appear despite Walmart’s ultra-strict ethics code? Or did it, paradoxically, appear because the code was so strict?

The point here is that Walmart left, essentially, nothing to its employees’ discretion. It didn’t trust them to do the right thing: it codified everything in a set of rules, and then told them to follow those rules. And you can see how that might have resulted in a kind of Calvinist scale-blindness, where accepting a soda when going to meet a vendor is exactly as bad as greasing Mexican wheels to the tune of 24 million dollars.

On top of that, the most senior executives at Walmart had a lot of discretion when it came to enforcing the rules. For someone like Roehm, who never fit in to the corporate culture, it was easy to find an infraction and fire her. On the other hand, when it came to allegations touching on Castro-Wright himself, it was similarly easy to hand the investigation off to one of his loyal subordinates, who did what he was expected to do and buried it.

Accepting a soda from a vendor, of course, is not illegal; engaging in sham investigations, on the other hand, is. Or can be, at any rate. At a grown-up organization, the Mexican allegations would have been a much darker shade of grey than anything that Roehm is alleged to have done, and would therefore have been taken much more seriously. But executives at Walmart, used to seeing the world in black and white, were unable to distinguish between the merely unethical and the downright illegal. As a result, there could be criminal charges for Walmart executives. Call it the ultimate unintended consequence of a strict ethics policy.

There’s a difference between having a soda bought for you and buying someone a soda. Internally, maybe Wal-Mart did not want its employees to make economically inefficient decisions based on who bestowed upon them the most favor, just like people in Mexico don’t want their government making decisions they wouldn’t otherwise make if an agent from a giant multinationals didn’t transfer six figures to their offshore bank account. Their ethics policy may be designed to support what’s good for Wal-Mart, not necessarily to follow any sort of legal or moral code. We shouldn’t expect anything else from a profit-seeking corporation in a competitive marketplace.