A major flaw that allowed for such scandals as the Enron scandal to occur was the low-level of funding given to the Securities and Exchange Commission (SEC).
The SEC, which, in theory, should have played a large part in preventing the Enron scandal, along with other scandals, was deemed severely underfunded in the time before the Sarbanes-Oxley Act was passed. One of the major elements of the Sarbanes-Oxley Act was to nearly double the budget of the SEC, along with giving the SEC power over determining exactly how to enforce Sarbanes-Oxley compliance among all the different spheres upon which the Act touched.
These two elements, along with many others, paved the way for the Sarbanes-Oxley Act to come into existence. Without such a seemingly perfect storm of elements, it is possible that the Sarbanes-Oxley Act would never have passed either the Senate or the House, but it came just as all members of Congress had realized unequivocally how numerous were the dangerous practices and elements that had allowed for the Enron and other scandals to occur.
As a further indicator of the time and climate in which it was created being the primary impetus behind its creation, the Sarbanes-Oxley Act actually came out of two separate bills: one proposed originally in the Senate and the other proposed originally in the House of Representatives.
Each bill passed its Congressional vote in its originating body, and then the two bills were reconciled into a single, stronger Act. As a result, Sarbanes-Oxley compliance would require all the behavior and changes that both acts suggested, leading to a very strong, decisive shift in the many areas that had originally made the Enron and other scandals possible.
In the end, the Sarbanes-Oxley Act was passed almost unanimously, with remarkably little resistance, again showing that it was the right time for that bill to come into existence. It has significantly strengthened penalties against the actions that Enron officials took, and should go a long way towards preventing any further breaches of business ethics of such a flagrant nature in the future.