Google shocked the business world this past spring when it snagged Ruth Porat to be its new chief financial officer. But as the inside story reveals, the move counts as one of the Internet giant’s easier moonshots.

The wooing began unwittingly early this year, when Google executive chairman Eric Schmidt visited Porat at Morgan Stanley MS , where she was CFO. Schmidt had worked with Porat a decade earlier, when she co-headed tech investment banking at the firm and played a key role in taking Google public. He didn’t know her well, however, and his visit was purely casual. He didn’t tell Porat that Google’s current finance chief was considering leaving, or that Google GOOG would probably need a new CFO—a sophisticated, battle-tested veteran—to oversee a complex corporate restructuring.

He also had no idea that Porat was contemplating a career shift. She’d climbed the ranks at Morgan Stanley for almost three decades, building a reputation as a uniquely resilient Wall Street survivor. She’d helped resurrect the firm after the 2008 financial crisis and conquered her own breast cancer. But Porat, at 57, had begun looking for new challenges. She may have signaled as much when she told Schmidt that she so loved How Google Works, his 2014 bestseller, that she gave copies to her managers. (“Really? You did?!” Schmidt replied, intrigued to hear that she had “such a curiosity about Google.”)

Members of the latest generation of high-powered Google alumnae, photographed in San Francisco in August. L to R: Claire Hughes Johnson COO, Stripe; Francoise Casals Brougher, Global Business Lead, Square; Stacy Brown- Philpot COO, TaskRabbit; Katie Stanton VP Global Media, Twitter; Natalie Fair Head of Finance, Pinterest; Sukhinder Singh Cassidy CEO, Joyus; April Underwood Head of Platform, Slack; Amy Chang CEO, Accompany From left to right: Claire Hughes Johnson, COO, Stripe; Francoise Casals Brougher, Global Business Lead, Square; Stacy Brown Philpot, COO, TaskRabbit; Katie Stanton, VP Global Media, Twitter; Natalie Fair, Head of Finance, Pinterest; Sukhinder Singh Cassidy, CEO, Joyus; April Underwood, Head of Platform, Slack; Amy Chang, CEO, AccompanyPhotograph by Cody Pickens for Fortune

From there, a Wall Street–Silicon Valley nexus fostered the relationship. Porat phoned her friend John Mack, the former CEO of Morgan Stanley, for help scoping out opportunities in California, where she had grown up. Mack called his friend Bill Campbell, the Intuit chairman and Apple AAPL board member who is also a Google adviser. Campbell initially viewed Porat as a potential addition to Google’s board. But in practically no time, she was meeting with Larry Page and Sergey Brin to talk about the CFO role. The Google co-founders quickly agreed that Porat was “our one and only choice,” Schmidt recalls.

Google announced its prodigious hire in late March. In an affectionate (and until now, not publicly disclosed) letter to Morgan Stanley co-workers, Porat said the move was “back to the future to another place that is creative, energetic and fun.” Arriving in May, she hit the Googleplex running. In July, reaction to the new CFO’s first earnings call added more than $65 billion to Google’s stock market value in one day. And Google’s August restructuring left Porat with even greater duties: She is now finance chief of not only Google but also its new holding company, Alphabet.

With its blue-chip recruit (Porat’s pay package totals around $70 million), Google did more than boost its managerial firepower. It also put a stake in the ground—yes, Google does have powerful female execs! Google is one of six Fortune 500 companies (and only two in tech) with two spots on this year’s Fortune Most Powerful Women list. Porat shares the distinction with Susan Wojcicki, CEO of Google’s YouTube unit.

WASHINGTON, DC - MARCH 02: Morgan Stanley Chief Financial Officer and Executive Vice President Ruth Porat participates in a panel discussion at the Brookings Institution March 2, 2015 in Washington, DC. The institution hosted a series of lectures and discussions as party of a program called "The Fed in the 21st century: Independence, governance, and accountability." (Photo by Chip Somodevilla/Getty Images) Ruth Porat, SVP & CFO of Google & Alphabet, and number 26 on our list. The Morgan Stanley veteran has become the force behind Google’s restructuring.Photograph by Chip Somodevilla—Getty Images

But the arrival of a high-level woman leader at Google also matters because it follows a string of high-profile losses—Sheryl Sandberg to Facebook FB in 2008, Marissa Mayer to Yahoo YHOO in 2012, Megan Smith to Washington, D.C., to become U.S. chief technology officer in 2014—along with other departures that inspired fretful commentary inside Google even when they didn’t make headlines. Red-hot startups such as Slack, Square, Stripe, and Uber have poached senior women, and these aspiring superstars are now applying their Google-gotten skills to fuel growth at other companies.

The exodus reflects the culture of the tech industry, where innovation is often a by-product of restless, risk-ready executives leaving their employers to start something new. And while the dissemination of talent may distress current employees, ex-Googlers see it differently. Says Francoise Casals Brougher, who left her vice president job at Google two years ago to help Twitter TWTR co-founder Jack Dorsey build Square: “Google has always wanted to have a major impact on the world. Having us go to other companies is an extension of that.”

To some observers, Google’s high-powered alumnae parallel the “PayPal mafia”—the group of onetime PayPal PYPL executives, including Reid Hoffman and Elon Musk, who went on to create LinkedIn LNKD , Tesla Motors TSLA , and other multibillion-dollar companies. While the PayPal mafia was a mob of dons, though, the ex-Google gang is dominated by donnas: In fact, no other tech company comes close to Google in developing female leaders.

To find out what these women have in common—to isolate “the Google Effect”—Fortune interviewed more than 25 current and former Googlers, scattered across 20 companies, asking them what Google taught them and what impelled them to leave a company that perennially ranks as the world’s best workplace. We learned that they gravitate to companies that are, well, Google-like: mission-driven, data-centric, and fast-growing, with empowered employees unconstrained by traditional ways of business building. Yes, gender does influence what they leave Google to do. And they require one more thing that they’ve grown accustomed to: a corporate culture where women have the opportunity to thrive as readily as men.


Google’s rank-and-file gender-diversity stats are not very good. With a 57,000-person workforce that is only 30% female, Google ranked below eBay EBAY , Facebook, HP HPQ , and other tech giants in a recent Fortune survey. Women comprise 18% of the company’s technical talent and 22% of its leadership. The imbalance reflects Google’s emphasis on hiring and promoting engineers—still a mostly male lot—and senior management acknowledges that the situation requires attention.

Still, to their credit, Google’s founders strove to create a diverse workforce from the beginning. According to Wojcicki, Google employee No. 16, Brin and Page wanted diversity “baked in” from the outset; a gender-balanced environment would be “a more interesting place to work and a place where people would want to spend more time,” she says.

Schmidt calls Wojcicki “the mother of Google”—and she has played an essential role in making it a place where women thrive. In 1998, Wojcicki rented her garage to the two Stanford grad students as they were hatching the company. She was a well-paid, satisfied marketing manager at Intel when Page and Brin asked her to join their fledgling business. “Larry and Sergey told me they would match every benefit that Intel had, and they’d provide child care,” Wojcicki recalls.

Wojcicki, now 47, was the third woman to join Google and the company’s first pregnant hire. She has spent most of her 16 years there building its core ad business, which generates the bulk of Google’s revenue, and building YouTube into a $4 billion business—all while having four more children. “Susan has it all, and she’s so down to earth,” says Katie Stanton, Twitter’s VP of global media, who worked for her at Google. After delivering baby No. 5, a girl, last December, Wojcicki took 14 weeks’ paid maternity leave and still has four weeks left to use, thanks largely to her own push for generous parental benefits.

Susan Wojcicki Susan Wojcicki, CEO of YouTube (and employee no.16) at Google, and also number 19 on our MPW list. The brains behind Google’s core ad business is now trying to tackle the tech gender gap.Photograph by Benjamin Rasmussen for Fortune

As a keeper of Google’s culture, Wojcicki has felt the onus to improve its diversity. One place she can make a difference is product management. Product managers are the mini-CEOs who bridge the technical and business worlds to steer product development from conception to launch; Wojcicki has final say on those hires across the entire company.

Meanwhile, she frets about the bigger challenge of training more female engineers who could someday apply for Google jobs. Though not a techie herself (she studied literature and history at Harvard before earning a master’s in economics and an MBA), Wojcicki can code. But she is dismayed that only 14% of computer-science grads are women, and by what she saw when her daughter went to computer camp last year: It was practically all boys. At Wojcicki’s strong urging, ID Tech Camps created Alexa Café, a chain of all-girl coding camps. This summer, Alexa Cafés sprang up in 10 U.S. cities. Says Wojcicki, whose teenage daughter attended one in Palo Alto: “The only way to correct diversity in tech is to make computer-science classes mandatory for all kids.”


While the mother of Google has never considered leaving (“What would I get out of that?” Wojcicki says), most other female stars at the company eventually exit. Why? “Career aspirations,” speculates Schmidt, speaking from experience. Schmidt remembers when Sandberg told him, in 2008, that she was quitting Google, where she was vice president of global online sales and operations, to become No. 2 to 23-year-old Mark Zuckerberg. “I said to her, ‘Why would you go to Facebook?’ ” Schmidt recalls. But he realizes now, “She hit the limit of what she could do at Google.” A company can be taken from small to big only once: Moving to Facebook enabled Sandberg, now 46, to do it twice.

Marissa Mayer, Google’s employee No. 20 and its first female engineer, quit her vice president job there three years ago to become CEO of Yahoo. “If Marissa were at Google today, she would likely be in charge of one of the Alphabet companies,” Schmidt says, but he acknowledges that someone as ambitious as Mayer would want a bigger role. (And Yahoo, a company with $4.6 billion in revenue, arguably faces more daunting growth challenges than either Google or Alphabet does.)

The departure of a Sandberg or a Mayer matters because powerful women executives at Google attract other women and inspire some to stay. Jen Fitzpatrick says that in 1999, when she joined out of Stanford, she “never imagined working at Google beyond the summer.” Sixteen years later, at 38, she’s vice president of engineering and product management for Google Maps and local search products. One of her mentors was Mayer, and the duo devised a way to improve diversity in hiring: they insisted that at least one woman executive interview every job candidate. “As important as it was to bring in strong women,” Mayer recalls, “we also wanted to recruit male programmers who would be great colleagues to women.”

Many Google alums view their alma mater as an extraordinary training ground but not necessarily the place to spend an entire career. In May, Rachel Whetstone, Google’s senior vice president of communications and policy, left to take an equivalent position at Uber, where global PR and regulatory challenges require a virtuoso. Whetstone, a prized adviser to Schmidt and the Google co-founders, says that at age 47, after spending a decade at Google, she decided she needed “a little kick up the backside.”

Then there’s Claire Hughes Johnson. She joined Google in 2004, when the company had only about 2,500 employees, and rose to oversee global online sales—inheriting much of Sandberg’s responsibility when Sandberg left. “What amazed me is that I stayed 10 years,” says Johnson, 43. She stayed because Google, with its fast decision-making and mission-driven atmosphere, “operated like a giant startup for longer than I expected.”

Interactive timeline “Google’s rise and the women who rose with it” by Analee Kasudia. Click the red circles and black bar on the bottom of the timeline.


 
But Johnson eventually felt her learning curve flatten. In a role many techies would kill for—vice president of Google X, in charge of self-driving cars—she was overseeing a business with no customers and no revenue. Then along came Stripe. Founded in 2010, Stripe gives Internet-based businesses a platform for accepting money from anyone, anywhere. The business isn’t sexy, but the opportunity to help entrepreneurs globally convinced her to join last October. Now she is chief operating officer at a startup with nearly 300 employees and $300 million in funding to date. (She has equity in Stripe, which private investors value at $5 billion.) Johnson aspires to play the same role at Stripe as Wojcicki has played at Google, shaping corporate culture from the ground up: “I’d like to figure out how we can make it such that diversity is not a project, but just the way Stripe is.”

In a way, Google is a victim of its own success: Few Internet businesses have made the transition from startup to giant—and any new company hoping to duplicate that arc would love to snare a Google veteran. It was at Google, where Sandberg’s sales-and-operations workforce grew from four to 4,000 employees in five years, that she learned the business-building skills that attracted Zuckerberg’s interest. “Think big. Hire big. Plan big” sums up Sandberg’s rules for scaling an organization. “Fast growth means you are always behind,” Sandberg tells Fortune. “I always tried to help teams see what they would need before they needed it.”

That foresight is all the more important at a company that’s so full of “smart creatives” (as Schmidt labels Google’s employees) that losing some superstars is inevitable. Stacy Brown-Philpot, who left Google in 2012 to be COO of TaskRabbit, recalls Sandberg pushing her to line up successors for herself in advance of promotions. One potential successor, Natalie Fair, left—and she’s now head of finance at Pinterest. A couple of years later, on the very day Brown-Philpot arrived in Hyderabad to head Google’s sales and operations in India, she confounded colleagues by asking for a list of 15 candidates who might eventually replace her. “They said, ‘You just got here!’ ” she recalls. “Yes, and I remembered Sheryl’s advice.” (In August, Brown-Philpot, 39, was named to the board of HP Inc., one of the two companies being launched from HP’s impending split.)

“No team has ever had too many strong performers,” Sandberg says. Lining up successors is also about “building your bench,” a crucial leadership skill.


Even for the brightest Googlers, striking out on their own can be frightening. Amy Chang, who spent eight years at the company and built a 300-person Google Analytics team, left in 2012 to “create something from scratch,” as she says. Chang started Accompany, which makes a “relationship management” app to help organize your contacts, with two co-founders: her husband, Ryan McDonough, a finance expert, and Matthias Ruhl, a former senior research scientist at Google. Chang is Accompany’s CEO, overseeing 30 employees and $20.6 million in funding. She says she feels as if she’s flying without a parachute: “I wake up at 2 o’clock in the morning saying ‘Ohmigod, what if I fail?’ That didn’t happen at Google.”

Here’s why: A company that owns the world’s largest digital-distribution platform can make smart employees think they’re smarter than they are. Google’s vast user base turns successes into blockbusters; the monetary fruits of the hits cushion the blows from the misfires. “It’s a wonderful luxury,” says Chang. “Google teaches you so much, but it also buffers and protects you.” Sukhinder Singh Cassidy, former president of Google’s Asia-Pacific and Latin American operations, agrees. The challenge for ex-Google entrepreneurs, she says, is “to create a flywheel that can succeed without that juice.” Cassidy, 45, spent six years at Google until creeping bureaucracy led her to quit in 2009. She headed social-shopping site Polyvore briefly and then started Joyus, a video-shopping service that she hopes will be the next HSN or QVC. She has 60 employees—two-thirds of them female—and has raised more than $40 million.

Says Jess Lee, 32, who left Google in 2008 to join Polyvore and four years later ascended to CEO: “Google is a great training ground for how to build an amazing culture and an amazing product. But Google is not that good at teaching you how to build a business.” Lee says Google’s focus on user experience—build a great product, and revenue will follow—relieves managers of profit-and-loss responsibility, which they’ll need to thrive elsewhere. (Schmidt says Google’s approach is designed to keep managers from prioritizing their unit’s P&L over the company’s.) At Polyvore, Lee shares the P&L—the data and the responsibility—with all 130 of her employees. (Women comprise half of Polyvore’s workforce and two-thirds of its executive team.) At any moment, anyone can check daily revenue and key sales metrics by logging on to the group-messaging app Slack. (Another former Googler, April Underwood, is head of platform at Slack.) Sharing Polyvore’s financials “forces everyone to understand that the business matters,” says Lee, verbally underscoring “business.”

Jess Lee, CEO Polyvore. Photographed in San Francisco, August 2015 “Google is a great training ground for how to build an amazing culture and an amazing product. But Google is not that good at teaching you how to build a business.” Jess Lee, CEO, PolyvorePhotograph by Cody Pickens for Fortune

In August, Yahoo agreed to buy Polyvore for an estimated $200 million. The acquisition represents a homecoming of sorts: Lee is a star graduate of the APM—associate product manager—program that Marissa Mayer created at Google to train entry-level techies to move into management. Lee says she learned from Mayer what a CEO’s true job is: “to support and empower employees.” This fall, Lee and her Polyvore staff are moving to Yahoo’s Sunnyvale, Calif., campus, where elements of the Google culture—free food, quarterly performance reviews, Friday all-hands meetings hosted by the CEO, and, yes, a version of the APM program—are part of the Mayer regime.


In one sense, Porat’s ties to the women of Google predate Google. Her father, a physicist and engineer who spent 26 years at Stanford’s SLAC National Accelerator Laboratory, worked there with Stanley Wojcicki—father of Susan. And when Ruth was 6 years old (before Susan was born), she swam in the pool at the Wojcickis’ home in Palo Alto.

Her own ties to the tech sector run just as deep. Porat serves on the board of trustees of her alma mater, Stanford—where Google lead director John Hennessy is president. So far at Google, she is both student and teacher. Schmidt and the Google co-founders had not figured out the details of their new corporate structure until Porat arrived; since then, “she’s been all Alphabet structuring all the time,” he says. Porat directly oversees some 6,000 Google employees—three times as many as at Morgan Stanley—because the new job includes people operations and real estate, in addition to finance.

John Mack, Porat’s former boss at Morgan Stanley, predicts that she’ll shine because “she understands complexity and she knows how to problem solve.” During the July earnings call, Porat hinted at where she’s likely to steer Google—and Alphabet—when she called for “expense discipline” and “proper resource allocation.”

While Porat’s hiring is a sign of Google’s maturity, it also shows the company’s prowess at attracting smart people whose careers are perpetual growth engines. Porat’s late mother, a practicing psychologist and an accomplished author, shaped her approach to work: As Porat wrote in her Morgan Stanley farewell letter, “My mother told me always to find subjects that inspired me, view all paths as open, never let anyone say I couldn’t do something.” Her latest move gives her many new paths to explore—and makes her a powerful role model for aspiring leaders in tech.

To see the full Most Powerful Women list, visit fortune.com/most-powerful-women.

A version of this article appears in the September 15, 2015 issue of Fortune magazine with the headline “The Google effect.”