You can drive down dark roads for a long time before an unexpected obstacle emerges.The question is: Will you be prepared when it happens, and positioned for the aftermath?

At the Wharton School of the University of Pennsylvania, my colleagues and I teach a required MBA course on legal and ethical responsibility. Many are skeptical that business people can be taught to do the right thing. To me, the goal is not to convey abstract moral principles or facts about the cases we cover, which most students will quickly forget. My objective is to help students appreciate, in a way that resonates for them, that law and ethics matter in business.

The tragic death in Arizona of a pedestrian struck by an Uber autonomous car is a teachable moment. It illustrates how basically good people working hard to succeed in business can produce terrible outcomes, for themselves and for the world. And Uber's flaws are an extreme version of a blind spot pervasive in Silicon Valley, epitomized in Facebook's longtime internal motto: "Move fast and break things."

Uber's business model is based on disregarding local taxi regulations and challenging labor classifications of drivers. Competitors, such as Lyft, at least acknowledged the countervailing interests, but Uber relentlessly pushes forward, painting cities as greedy protectors of incumbent firms and regulators as clueless impediments to progress.

Uber isn't evil. Its thousands of employees work every day to build an innovative business that provides value to its customers. Ride-sharing services help cut down on drunken driving and combat the biases that make taxis speed past African Americans. The problem is that a culture that relentlessly prioritizes ends over means will ill-prepare firms for the hard choices that circumstances eventually demand.

Was it any surprise that Uber, and not the dozen or so other participants in the autonomous race for autonomous driving, caused the first pedestrian fatality? That it pushed forward with on-road testing and reduced the number of humans as backups, even as its technology badly lagged competitors'? That its former autonomous technology czar Anthony Levandowski reportedly expressed disappointment Uber didn't experience the first driver fatality in a car driving itself? Or that Uber, rather than Dropbox or Airbnb, was rife with sexual harassment in its workplace, paid off hackers to keep quiet a data breach, and designed software specifically to mislead government officials? Keep cutting legal and ethical corners long enough, and eventually some cuts become self-inflicted wounds.

For years, the answer to complaints about Uber's stance was an 11-digit number: the company's valuation, eventually surpassing $70 billion. Do-gooders might tsk-tsk, but, Uber's defenders argued, the market didn't care. And there would be time to clean up the messes later, after the company achieved Google-like or Facebook-like market dominance.

But this way of thinking is a mirage. A growth company's valuation isn't an assessment of its current worth; it's a projection into the future. Realizing the massive potential of a startup such as Uber means building durable trust and avoiding catastrophic missteps. When the crises come, firms without stocks of legal and ethical goodwill are the most vulnerable. And they are the most likely to provoke the very regulation they so desperately work to avoid.

The state of Arizona didn't give Uber the benefit of the doubt that some others might have enjoyed. It immediately suspended Uber's license to test autonomous vehicles shortly after the crash. Similarly, Facebook saw $100 billion in market capitalization evaporate in the Cambridge Analytica scandal, because its reputation transcended Mark Zuckerberg's heartfelt promises to make Facebook a force for good.

Uber's new CEO, Dara Khosrowshahi, and his leadership team seem genuinely committed to changing the firm's culture. But that's a hard thing to do, and it's impossible to do quickly.

Twenty years ago, Microsoft was in something like Uber's position: seemingly thriving despite –  or perhaps because of – practices like threatening to "cut off the air supply" of potential competitors.

It took many years and two leadership changes for Microsoft to evolve to its current state: Still a nimble competitor, but a leader in legal and ethical domains such as digital privacy protection and algorithmic accountability. And not by accident, its stock, long in the doldrums, went on a tear as the New Microsoft emerged. Facebook, Google, and Uber are on the path toward a similar transformation. They could still fail. The turn to responsibility is toughest for companies that grew the fastest and put ethics way on the back burner.

In the long run, legal and ethical responsibility isn't a choice. No company grows frantically forever. The harms from legal and ethical slip-ups scale along with a firm's size and influence, as does the rest of the world's tendency to react.

The companies that take ethics and law seriously every day, from visible leadership actions on down, aren't assured a clear path, any more than the Ubers of the world are guaranteed to stumble before reaching their objectives. Business is never about certainty. It's about choosing which risks to take in an uncertain world. Skimping on legal and ethical responsibility is a bad bet.

Kevin Werbach is an associate professor of legal studies and business ethics at the Wharton School, University of Pennsylvania. He served on the Obama administration's Presidential Transition Team and was counsel for new technology policy at the Federal Communications Commission.