The Great Recession and its causes sparked so much interest from outside the financial industry that it resulted in books, movies, and documentaries highlighting what went wrong and who, exactly, was to blame. Few disagreed that greedy bankers were at fault, throwing caution to the wind and creating toxic financial products that didn’t just make clients lose money, but wrecked the global financial system.

This narrative is neat, and neat narratives are almost always flawed. While the greed of some in the financial industry was unquestionably a proximate cause of the crisis, the greed on display was by no means limited to Wall Street. A very famous scene in Michael Lewis’s The Big Short, which was recreated in the movie, displays this greed in full, when one of the characters speaks to a dancer in Las Vegas who has no reliable income but has bought multiple properties on no-money-down mortgages.

That was a real event, and the analyst who went to Las Vegas made a substantial amount of money betting against the market. It was also just one of many examples of non-Wall Street types seeing dollar signs and acting irresponsibly as a result. Mortgage bankers and underwriters—who operate in small banks around the country and are far removed from Wall Street—approved a lot of mortgages they shouldn’t have in order to nab bonuses. The homebuyers themselves, many turned into quasi-landlord businesses by buying several properties to rent out to other people for a big profit were not acting out of altruism, and they did not think too much about the effects of their activities.

Another big party who failed to stop the subprime mortgage crisis were the ratings agencies themselves. While the public often assumes they are parts of Wall Street, Moody’s, S&P, and Fitch are not seen as part of Wall Street at all, and are more often bundled together with auditors and accountants than hedge funds and big investment banks. Yet their bad ratings were a significant cause of the derivatives contracts causing knock-off effects around the globe.

Part of why ratings agencies messed up goes back to legislators and lawmakers—a group that rarely gets much sympathy from the public, but whose poor regulatory rules and refusal to listen to economic advisors created the opportunities for the big banks’ bad actions.

None of this is to excuse the wrongdoing of the bankers who did wrong, but merely to get to the heart of why bankers sometimes break the law: they do it for the same reason as others in other industries, which is often self interest. When bankers find opportunities to cut corners, look the other way, or simply fail to do their job with sufficient due diligence, there is almost always a risk/reward analysis going through the bankers’ minds: does the reward exceed the risks of the act?

Of course, many bankers will simply reject such an analysis and assert that unethical actions are unethical, end of story, no group of people is 100% good, and just as there are corrupt people in other industries, so too do corrupt people enter the financial industry. And while there is a popular belief that many enter the financial industry specifically because it attracts more corrupt people than others, it’s important to note that there is no real evidence of this and, particularly when discussing Wall Street, the financial industry in America is one of the heaviest and most aggressively regulated sectors on Earth.

Getting into banking so you can get rich from laundering money for drug dealers is not as easy as it sounds, nor as rewarding. It takes years of work before one can get in a position to commit such egregious act, which is why the bulk of financial crimes committed are on a much smaller scale and much less exciting. Think tax fraud more than large scale operations with drug cartels, and think breaking largely abstract fiduciary rules rather than toppling the global financial system.

Ultimately, some bankers break the law sometimes because the temptation is too great and the rewards are so much larger than the potential punishments, that it makes rational sense to go the illegal route over the legal one. What is important is to create a financial system where these illegal actions are easily discovered, fiercely punished, and actively policed against.

On that front, the financial industry has made significant strides since 2008, with new regulations and new limitations on bank practices making the no-money-down mortgages of the mid-2000s a thing of the past. That doesn’t mean financial crime has disappeared, however; it just means that the few places where people can get away with the crimes are less harmful to the system as a whole and harder to find. But for now, bankers break the law for the same reason computer programmers, doctors, lawyers, politicians, or any other group does: because they think the benefits outweigh the costs and the systems aren’t there to make them think otherwise.