The Wells Fargo scandal that broke last week involving fake accounts with real customer money was a corporate scandal unlike others, and the case offers important lessons for how companies can avoid creating a culture vulnerable to corruption.

There’s no shortage of business scandals in the headlines. But we’re most accustomed to those that start at or near the top, whether now-clichéd stories of greed-driven CEOs like Turing’s Martin Shkreli or tales of unscrupulous behavior on the part of a small group of key decision-makers, like the Volkswagen engineers and their emissions “workaround.”

The Wells Fargo scandal was far different. Instead of a select few doing bad things, the unethical behavior was widespread at the bank, with thousands of employees engaged in secretly creating new bank and credit-card accounts for customers without their knowledge, resulting in overdraft and other fees. So far, 5,300 Wells Fargo employees have been fired over the issue.

And whereas most headline-making unethical behavior is aimed at driving financial gain for the organization or individual, that was less clearly the case here; it seemed more related to employees trying to meet aggressive sales goals, such as the bank’s “Gr-eight” initiative — a push to increase the average number of financial products customers held from six to eight.

The question now is what makes an employee more likely to lock up their moral compass, even if temporarily? Understanding how such unethical behavior arose in the first place can point to practical steps to avoid it and the reputational damage that goes along with it. So here are four explanations that may have left employees at the bank susceptible to unethical behavior:

They feel pressured.

One morality-diminishing factor that was likely at play at Wells Fargo was the presence of overly aggressive goals and performance pressure. In the face of hard-to-reach objectives like Wells Fargo’s “Gr-eight” campaign, people are more likely to become morally disengaged, and to consider cheating to make the grade. As a researcher focused the psychological mechanisms of immoral behavior, including those related to everyday behaviors, my colleagues and I have found that anxiety at work impacts employees’ ethics. Humans opt for self-protection as a survival mechanism in the face of pressure, and become less concerned about ethics.

They think — ‘meh, it’s just business.’

Another factor can be an It’s just business’ mentality, which can eliminate personal feelings, values, and ethics from professional situations. Our research has shown that a business mindset leads to dishonesty and lack of consideration for other things like moral issues. Wells Fargo employees may have seen their behaviors as justified by simple cost-benefit analyses, where each new account opened benefited them, with presumably negligible harm to clients.

They separate their lives at work from their lives at home.

Another factor in unethical behavior has to do with how we see our identities. My research shows that when people “segment” their identities into different roles—parent, professional, coach—rather than integrating these into a more unified whole, it can lead to feelings of inauthenticity and, in turn, unethical behavior. In the Wells Fargo case, that might mean an employee could have separated their professional role from their personal life to avoid feeling bad about anything they do at work. Also, they may have justified acting badly with more ethical behavior outside of work.

Morality matters deeply to us, so we tread very carefully in these matters and go to great lengths to preserve our positive moral self-image, to an extent that our memory of our transgressions gets obfuscated over time, which helps explain repeated dishonesty. But whatever the sources of the scandalous Wells Fargo behavior, the news raises the issue of “moral muteness,” or people’s reluctance to communicate their moral concerns and speak up about unethical behaviors in the workplace. My experiments in progress show that most people remain quiet in such situations, especially when it does not harm them personally. And importantly, peers are less likely than bosses to speak up.

Leaders can promote a “see something, say something” environment by communicating that any reports will be followed up on (and how), with steps taken to ensure the safety of those who speak up. Some of my research in progress shows that encouraging authenticity, or acting in accord with one’s true self, increases speaking up and reduces silence.

By understanding the factors at play, leaders can take steps to prevent unethical behavior and its high costs.

Maryam Kouchaki is an assistant professor at Kellogg School of Management at Northwestern University.