Travis Kalanick. (Scott Eells/Bloomberg)

Silicon Valley and its associated start-ups are often described as having a “Peter Pan” mentality. High jinks are indulged, and an adolescent atmosphere is encouraged. Smart young (or young-seeming) makers develop apps that approximate adult forms of labor and turn their companies into gold. Like J.M. Barrie’s creation, these Peters tend to be childish, boastful and a bit irritating to be around. But they can take you on an exciting adventure.

How better to describe recently deposed Uber chief executive Travis Kalanick, the 40-year-old bro who once joked about a service called “boob-er,” bragged that he enjoyed “pissing people off” and took his company from nothing to a $70 billion valuation in under a decade?

As it turns out, you can’t stay in Neverland forever. And this week, we watched in real time as Uber and its leadership discovered what it takes to grow up. A major catalyst seems to have been the realization that in business, as in everyday life, other people matter. There was also the growing understanding that, after a while, adolescence gets old.

The calls for change originated with rank-and-file employees such as engineer Susan Fowler, who got fed up enough with harrassment, sexism and poor management to finally to blow the whistle. Her detailed, damning blog post about Uber’s toxic culture kicked off waves of commiseration and, in the end, a change of leadership at the top.

There also were the everyday Uber drivers, undervalued and unlistened-to, who were bold enough to call out a callous employer. It was a struggling driver’s recording of Kalanick telling him that “some people don’t like to take responsibility for their own s---” that prompted the CEO’s public acknowledgement that he needed to “grow up.”

From person to person the outrage spread, down even to common riders, who (rarely, but every so often!) looked up and decided that they didn’t want to support a business that ran the way Uber did. Some simply popularized the #DeleteUber hashtag. After the company was accused of undermining a work stoppage called by New York taxi drivers being held in solidarity with immigrant travelers, managers were flooded with so many complaints that apologetic form letters were sent out begging riders to give the service another chance. Kalanick himself was forced to rethink his position on President Trump’s business advisory council.

It would be naive to be too high-minded about all this. People started to matter more to Uber, yes, but they began to matter most when they affected the business’s bottom line. It was only when it stopped being profitable to put up with Peter Pan that the grown-ups in the room — Uber’s board and investors — decided that he had to go. And even so, the shift isn’t happening without pushback. Shortly after Kalanick’s ouster, notes and petitions for his reinstatement started to circulate among Uber employees: “Uber is TK and TK is Uber ”; “ Nobody is perfect [but] he’s critical to [Uber’s] future success.”

It seems there are still a good number of Lost Boys (and Girls) who think a tolerance for misconduct is key to advancement and who might prefer to remain in extended childhood, even at the expense of co-workers, employees and the community at large. And it’s more evidence (as if we needed it) that investors will tolerate all manner of misdeeds for a chance at fantastical profits.

Yet there’s some reason to feel encouraged, too. The “support Travis” petition has gotten signatures from only a small fraction of Uber’s network of 15,000 employees, suggesting an appetite for a move into the real world. Most of the company seems to understand that at a certain point it’s time to grow up. Investors may be willing to do almost anything for a chance at a unicorn, but they’re coming to realize that sexism, sexual harassment and an anything-goes culture aren’t the best roads to success.

Kalanick’s exit is a positive development, but this story is far from over. The next challenge will be to prove that it’s possible for a company like Uber to build and prosper with a leader who’s more Wendy than Peter Pan. If it can, perhaps more of Silicon Valley’s perpetual children will grow up and follow suit.