Many people in Silicon Valley believe that the way to be successful is to “move fast and break things.” Sometimes they end up breaking the very businesses they created, as anybody involved with Uber now knows.

There’s a cautionary message in Travis Kalanick’s resignation as chief executive of Uber under pressure from investors who were responding to a series of sexual harassment, discrimination and legal scandals that have rocked the company recently. In many ways Uber is an extreme case of a business where rapid growth has fueled executive hubris and an anything-goes corporate culture. It is also very much a creature of a technology industry that is still struggling to graduate from adolescence to adulthood. For all its brilliant minds, Silicon Valley often can’t recognize its own flaws, let alone fix them.

Uber would have attracted controversy even if a different chief executive had led it. After all, it was seeking to disrupt an existing taxi industry that in many cities had become a complacent oligopoly that ripped off consumers with the blessing of local officials. But under Mr. Kalanick, Uber came to be defined by questionable behavior, deceiving law enforcement and antagonizing and manipulating drivers who did the work that made its business possible. Extreme even for an industry known for chauvinism, Uber fostered a “bro” culture where brashness was rewarded, hesitation was for losers and the few women who were hired were ignored or harassed.

It would be easy to blame only Mr. Kalanick and his team for this mess and say their departure — some top executives were forced out earlier — will fix the problem. But that would be ridiculously naïve. The culture at Uber and other companies like it is enabled by an ecosystem in which venture capitalists, investors, board members and others let founders and executives indulge in bad behavior as long as they keep delivering rapid-fire growth with the promise of a stupendous return on investment. They have paid far too little attention to building sustainable businesses that respect norms of good corporate behavior and, in some cases, even the rule of law.

The economy and society need start-ups like Uber that are willing to challenge monopolistic practices and entrenched businesses. But Silicon Valley executives and investors need to learn to leaven their aggressiveness with good judgment, humility and a large helping of ethics. They will find that those qualities are essential to building companies that last.