When a company systematically breaks a law, we are often surprised. We shouldn’t be.

Every business leader is taught that success depends upon creating an organizational culture with a shared sense of purpose and values between employees and leadership.

Uber’s ongoing allegations of hostile and unfair treatment of female employees and Wells Fargo’s secret creation of millions of unauthorized deposit and credit card accounts at the expense of customers show that company culture can actually incite coordinated illegal activities. How does this happen?

Jack Ewing, author of “Faster, Higher, Farther” looked at this issue in connection with the fraud surrounding Volkswagen’s corporate decision to sell hundreds of thousands of cars with diesel engines that did not comply with environmental regulations. Over many years, VW systematically built engines designed to cheat on emission tests and to obscure inspections on just how toxic they were.

How it got to this point is instructive. It begins with the corporate culture.

A “corporate culture is never written down; it’s just what everyone knows,” Ewing told me. CEOs who do not tolerate failure or who are not interested in dissenting opinions rapidly create an environment where issues of legality or social norms become irrelevant against the broader goal of growth.

Tension inevitably builds because at some point in any large organization, employees will have to exercise judgement and decide for themselves what is right or wrong. When faced with that choice, will employees do the right thing?

As an observer of business culture, Ewing says the answer is clear: employees will not always do what is right, that “it’s up to management to set an example.”

My experience in the business world very much supports what Ewing observed through his research on Volkswagen. Leaders must encourage employees who might have bad news to deliver to speak up, and create an environment where subordinates can express themselves about uncomfortable situations. A mercurial founder who makes it clear he or she won’t tolerate contrary opinions is less likely to hear about important issues.

For VW and its substandard diesel engines and Uber with its perceived negative treatment of female employees, we have learned in retrospect of ample opportunities for the companies to change their paths and do the right thing, but employees didn’t feel safe to raise their concerns, and leadership didn’t show an interest.

It really does start at the top.

Stories like these serve as a reminder that without rules governing conduct, we should not assume that businesses will always act ethically. Business leaders are generally evaluated against the twin metrics of profitability and their ability to achieve effective collective action. If a company is justifiably motivated to pursue profit, we should not expect that every business will act in society’s best interest.

Let’s be fair to our business leaders; their job is to maximize profits and work within the rules, not to create new ones.

If we want to eliminate pollution, benefit from a fair financial services industry, and enjoy equality in the workplace, it is wise to have rules for business to follow.

We do not assume that citizens will always do the right thing — that’s why we have laws to regulate conduct. Why assume that it is any different for businesses?

A company can be objectively well-managed, yet willfully violate the law. Like a well-schooled crew team, frantically stroking as it tips over a waterfall.

Jonathan Aberman is a business owner, entrepreneur and founder of Tandem NSI, a national community that connects innovators to government agencies. He is host of “What’s Working in Washington” on WFED, a program that highlights business and innovation, and he lectures at the University of Maryland’s Robert H. Smith School of Business.