There’s a big misconception about white-color crime. Far too many people seem to think that top executives have no moral compass. That corporate America’s CEOs would sell their mothers into slavery to make a buck. You hear that sort of thing all the time from the likes of Elizabeth Warren and Bernie Sanders.

Fortunately, that’s not reality. The occasional Theranos and Enron notwithstanding, business leaders are inherently ethical. Don’t laugh, I’m serious. And I’m going to tell you why.  

Don’t get me wrong, there are certainly all sorts of opportunities to stray. Insider trading, stock-option backdating, conflicts of interest, accounting fraud, financial fraud, investor fraud, consumer fraud, antitrust, patent infringement, corporate corruption, cronyism. You name it, over the course of my career, I’ve seen it.

I’ve known some otherwise honest people who, for whatever reason, were drawn to the dark side. I knew Raj Rajaratnam when he was an analyst at Needham. One day he told me he was quitting to run a hedge fund. Today, the billionaire Galleon Group co-founder is serving an 11-year prison term for insider trading, a scandal that ensnared top execs from IBM, Goldman Sachs, McKinsey and Intel Capital.  

The good news is, that sort of thing is extremely rare. For every Elizabeth Holmes and Jeff Skilling there are hundreds, perhaps thousands of honest, ethical CEOs who never cross the line. The question is, why is it so rare? I bet most of you will say it’s about ethics. That may be true, but it doesn’t explain where the ethics come from. We’re certainly not born with it.

I’ve pondered this question for years and come up with three factors. The first is an emotional one that relates to role models.

There were a series of episodes growing up where my dad – a strict disciplinarian with an unassailable work ethic – surprised the hell out of me by responding positively when I thought he’d go ballistic. I once confessed to stealing candy from a local shop and he commended me for being honest. And when I was accused of lying by another kid’s father, he stood up for me, saying, “Steve may be a lot of things but he’s not a liar.”  

Fast-forward a decade or so. I spent the first six years of my career as an engineer with Texas Instruments. My managers were all salt of the earth people who were incredibly generous with their time, especially when I was stuck or troubled by a tough dilemma. Their doors were always open, their advice genuine and their manner encouraging, even when I screwed up. 

When we face people we respect and admit to failure or confess to bad behavior, how they respond makes all the difference. When they show faith in us despite our issues, that resonates with us emotionally. It makes us want to earn their respect and deserve their faith. It sticks with us. And it shapes our behavior going forward.

The second factor is a logical and practical one.

Lying or stretching the truth is actually a real pain in the ass. Even exaggerations have a way of growing and taking on a life of their own. Before you know it, you’re constantly looking over your shoulder and covering your tracks. It’s exhausting. And it’s a house of cards that eventually comes tumbling down.

Mark Twain famously said, “If you tell the truth you don’t have to remember anything.” While it’s true that honesty is a lot less stressful than dishonesty, the latter is also an inherently flawed and unsustainable model. There are consequences. Serious consequences. It isn’t logical to risk losing your freedom, your reputation, your possessions and your family.

Simply put, dishonesty is way more trouble than it’s worth.

The third factor is karma. I’m not talking about karma that helps you in your next life; I’m talking about karma that helps you in this one. “Instant karma,” as John Lennon wrote. Try as we might to tell ourselves that we have good motives behind our bad behavior, on a subconscious level, we always know what we’ve done. And it plagues us.

Even if we’re so adept at compartmentalization that we can successfully delude ourselves into hiding the truth from ourselves, sooner or later those walls come crashing down. And let me tell you, it’s no picnic when they do. One way or another, people who do bad things end up living in their own personal hell.

What goes around really does come around.

Image credit Alex Proimos / Flickr

A version of this originally appeared on Entrepreneur.com.