But that’s not why Loeb sold most of his stake. His thesis, according to several people, was that if things worked out the stock would be worth $25 to $30, and by last spring it was $29. So he went to Mayer and said he wanted to sell 20 million shares, or one-third of his remaining holdings. On Friday, July 19, Mayer came back to him with a different offer. She said that Yahoo would buy back the stock itself—thereby guaranteeing Loeb a price that he may or may not have been able to get in the market—but only if he sold 40 million shares. That would bring Loeb’s stake below the 2 percent threshold, which meant that he and the other two representatives would have to leave the board. Loeb was shocked that she would want him and his team gone, according to two people, but it was too good a deal to pass up. On July 22, Yahoo announced that it would buy back 40 million shares from Loeb. The entire affair netted his hedge fund around $1 billion.

There are two ways to look at this, both of which may be true. One is that Mayer didn’t want any pushback, and Loeb is an investor who constantly pushes back. The other is that she is one of the few people to have outmaneuvered Loeb. “She dodged a bullet,” says an industry executive. “I thought she and Dan were going to go sideways. He would have fired her. Both are extreme alphas. Dan was going to turn at some point. She ran the first gauntlet. She got him out. Dan had a gun to her head whether she knew it or not, and she orchestrated his departure.”

Immediately after Loeb left, Vogue ran a flattering profile on Mayer called “Hail to the Chief,” which featured a photo of her lying upside down on a chaise longue and examining a photo of herself on an iPad. In the article, Mayer told Vogue that she “didn’t set out to be at the top of technology companies.” She continued, “I’m just geeky and shy and I like to code.” She went on to say that Eric Schmidt, then Google’s C.E.O., pointed out to her that, “when you want to have an impact that’s bigger than just you, you move from being an individual contributor to managing a team… And I was like, ‘Oh, right—it would be nice to have an impact that’s bigger than just me.’ It’s not like I had a grand plan where I weighed all the pros and cons of what I wanted to do—it just sort of happened.”

The most interesting reactions to this claim come from others in the Valley, some of whom think that her story isn’t so much one of rewards flowing effortlessly from amazing talent as it is of ambition cleverly and aggressively pursued. Which is great—just don’t deny it. “Own it!” a female executive tells me. The only legitimate reason Mayer doesn’t, this woman thinks, is because even she is afraid of the criticism that women who embrace their power can face. Another executive has a slightly different take. This person thinks that Mayer figured out very early on that being a female engineer—a rarity in a culture that reveres engineers—gave her a pass that other women without that credential would never have. After all, her flaws, like her habit of being late, are easily fixable—should she care to fix them. “This idea that she is shy and just a quiet engineer is such fucking bullshit!” the executive says. “She is savvy about knowing that it makes her Teflon.”

At least for now, Mayer is Teflon, thanks to her celebrity status and Yahoo’s stake in Alibaba. There is a belief in the Valley that the ability to create innovative products trumps all flaws. And so, if Mayer’s superpower isn’t empathy but rather an ability to create products that consumers want, if she really is a rare one with that magic, then she will stay on top.