Yahoo’s offices have become a grim place of late. In February, C.E.O Marissa Mayer announced that the company would shed 15 percent of its staff as it explores a sale of its core business. This human “streamlining” has been particularly brutal for morale at Yahoo’s extensive media holdings. Numerous publications have been shuttered, including Yahoo Food, Yahoo Health, Yahoo Parenting, Yahoo Makers, Yahoo Travel, Yahoo Autos, and Yahoo Real Estate. In the company’s newsroom, on West 43rd Street, there are now so many empty desks that remaining employees have “corralled everyone together so it didn’t feel so lonely,” one staffer told me.

Yahoo’s journalists used to joke amongst themselves about the extensive variety of Kind bars provided, but now the snacks aren’t being replenished. Instead, employees frequently remind each other that there is little reason to bother creating quality work within Yahoo’s vast eco-system of middle-brow content. “You are competing against Kim Kardashian’s ass,” goes a common refrain.

It wasn’t supposed to be this way. On her first official day as the C.E.O. of Yahoo, in July 2012, Mayer pulled up to the company’s Sunnyvale, California, headquarters in her hunter-green BMW to an ecstatic outpouring of optimism. According to Nicholas Carlson’s definitive book, Marissa Mayer and the Fight to Save Yahoo!, wall screens projected “Welcome Marissa!” and Mayer’s face was adorned on Shepard Fairey–style posters above the word “HOPE,” in all caps. David Filo, Yahoo’s co-founder, personally unfurled a purple carpet to lead the company’s newest leader through the front doors of its headquarters.

Mayer was hired, in part, to sort out Yahoo’s identity crisis—was it a media business, or rather a tech company? It was a confusing question. Yahoo began as a general guide to the Internet, one that aimed to be all things to all users—chat rooms, news sites, e-mail, fantasy football, you name it. For a time, this strategy worked brilliantly. At its peak, Yahoo’s market capitalization reached $128 billion. But as Yahoo expanded, other companies became more specialized and began eating away at its domination in niche categories. Soon enough, it was losing out to Google in search and e-mail, Craigslist in classifieds, and countless Web sites in editorial. Its market capitalization is now approximately $35 billion, virtually all of which owes to its stake in Alibaba, the Chinese Internet giant.

By the time Mayer was hired, however, Yahoo still boasted an enormous digital audience. But running a media company was not intended as Mayer’s brief. She was a technology executive who had ascended to the top ranks of Google by focusing on the product side of the business. Now, she had a broad mandate to return the company to among Silicon Valley’s elite. Successful tech companies, after all, are far more valuable than even thriving media businesses.

But while Mayer worked away on new products, she also seemed to harbor an ambition to turn Yahoo into a media juggernaut, too—even if she didn’t have any experience in the field. And it didn’t seem to matter if Yahoo already had a massive audience. Successful or not, Mayer had little interest in the sort of content that Yahoo was creating—the sort of content, that is, for people searching for pictures of Kim Kardashian’s backside. The glamorous C.E.O. wanted instead to upgrade her site by hiring a roster of big-name journalistic talent. “One of her initial observations of us,” one former Yahoo executive told me, “was that we don’t have big-enough names.”

Mayer quickly addressed this concern. She hired Katie Couric as Yahoo’s “global anchor” in late 2013, for a deal reportedly worth more than $5 million a year. (According to a person close to the company, the deal has been renewed at a value closer to $10 million, in a combination of cash and stock.) Yahoo recruited Megan Liberman from The New York Times to be editor in chief of Yahoo News; it also hired the Times’ tech columnist David Pogue and its star political reporter, Matt Bai. Andy Serwer, the former editor of Fortune, was brought in to run Yahoo Finance. Mayer recruited *Elle’*s then creative director, Joe Zee, to run a style-focused digital magazine, former New York Post Page Six editor Paula Froelich to lead Yahoo Travel, and makeup impresario Bobbi Brown to run Yahoo Beauty. In the process, Mayer shuttered Shine, Yahoo’s middle-brow site for women, with its 500 million monthly page views.