It isn’t shocking that some business leaders lie, cheat, steal or neglect critical problems.

Consider the corporate scandals in just the past few years: Emissions test cheating at Volkswagen. Millions of fake accounts at Wells Fargo. Lax data protection at Facebook and Equifax.

But it never fails to amaze when those who play a key role in the scandals are otherwise highly successful executives with good reputations. Why would such leaders risk their careers and good names?

Even in matters legitimately open to interpretation – like ambiguously worded regulations, lack of legal precedent and complex accounting principles – why not play it safe, rather than seeing how much you can get away with?

There’s no single explanation, but there are some pretty common patterns.

They cross the line inch by inch

Attorneys who prosecute and defend white-collar criminals say the same thing: Many executives who step into the realm of seriously unethical and unlawful behavior usually don’t do so all of a sudden. It’s more of a gradual process.

They want to do the right thing, said Greg Morvillo, a partner at the law firm Orrick. But when things get tough for their business or in the market they step closer to the line between right and wrong.

“Then things get tougher. At some point, they look down and realize they crossed the line three feet ago,” Morvillo said.

Amy Walsh, another Orrick partner, said those who get caught typically have been cutting corners, telling white lies and committing small ethical lapses their entire careers. “Then they’re elevated to a position where they’re under enormous pressure to succeed or risk being fired or demoted,” Walsh said.

That’s when they may choose to make a serious wrong turn.

Andrew Fastow, who went to prison for his central role in the Enron scandal, has talked about how his creative accounting moves violated the spirit of the rules governing financial statements.

“I always tried to technically follow the rules, but I also undermined the principle of the rule by finding the loophole,” Fastow, Enron’s former chief financial officer, told the Association of Certified Fraud Examiners in 2016.

The purpose of financial statements, of course, is to provide a fair and true picture of a company’s position, said John Gill, ACFE’s vice president for education.

They follow orders

The problem with pinpointing blame for corporate malfeasance is that it may start with an abstract order from the top.

A CEO may say, “We’ve got to do what it takes to boost revenue because we can’t have another bad quarter.”

Those charged with increasing revenue may choose an unethical route to do that, such as cooking the books. And they may be incentivized to keep doing the wrong thing by way of praise, promotion or bonuses.

If caught, however, senior executives and their subordinates may claim they were following orders and expectations. And CEOs – legitimately or not – may claim they never told anyone to do anything illegal.

“A CEO may think to himself ‘I employ adults, and I rely on them to perform ethically,’” Walsh said.

CEOs also may say they were never made aware of the illicit practice since the higher you go in a company, the more likely your direct reports will just give you the top line takeaways of a situation, rather than the nitty gritty details.

After the CEOs of Wells Fargo and Equifax walked away from the scandals that rocked their companies, Senator Elizabeth Warren introduced two bills that would, among other things, expand the criminal liability of “negligent” executives at companies with more than $1 billion in revenue and require CEOs in charge of large financial institutions to certify that there is no criminal conduct or civil fraud at their institutions.

They work in an ethically lax culture or industry

CEOs’ plausible deniability, however, may be tougher to assert if their team has been taking their behavioral cues from the top.

For instance, a company may have an ethics policy, which the CEO cites publicly. But that message gets lost when a CEO behaves unethically in front of his team or other subordinates – for example by lying to those he’s trying to cut a deal with on the phone, Walsh said. “So they follow his example.”

That was certainly the problem at Enron, where “senior management set very bad examples by the decisions they were making,” Fastow told ACFE.

Or someone might make ethically and legally questionable moves because, well, everyone else in the industry is doing it.

A good example was the fraudulent rigging of global interest rates by banks, said Eugene Soltes, a professor at Harvard Business School and author of the book, “Why They Do It: Inside the Mind of the White-Collar Criminal.”

“If I see every bank doing it, all of a sudden it starts not to feel like it’s an egregious practice. It’s just how it’s done,” Soltes said.

They don’t see the harm

It’s a lot easier to behave illicitly if an executive doesn’t know or never sees the people who will be harmed, or if the harm won’t occur until much later, Soltes said. In fact, he found many of the white-collar criminals he interviewed never considered they were causing harm.

The same goes if the harm is abstract, such as the assertion that insider trading harms the integrity of the market.

And to the extent there is an awareness that harm is being done, the executive may rationalize that an illicit action may be necessary to preserve the jobs of those at her company or to help boost the stock price for investors, Morvillo said.

“They think, ‘If I acknowledged the difficulties of the business, it will actually be worse for the company and the people who work here.’”