About two hours, or 20 percent, into Mark Zuckerberg’s marathon testimony before Congress this week, the Facebook CEO had a slightly awkward exchange with senator John Cornyn (R-Texas). Cornyn wanted to know what happens to people’s data when they delete their accounts. Zuckerberg responded that Facebook deletes their data. But Cornyn continued, “How about third parties that you have contracted with to use some of that underlying information, perhaps to target advertising for themselves?”

To Zuckerberg, this must have been exasperating. As he has said over and over, Facebook doesn’t sell data to advertisers. Doing so could allow outsiders to build competitive ad-targeting products that would undermine Facebook’s business. And so Zuckerberg patiently explained, yet again, how Facebook works. “We do not sell data to advertisers. We don't sell data to anyone.”

Before the hearings, Zuckerberg’s colleagues in Menlo Park had been nervous. The company had been battered, insulted, and mocked for weeks. The stock price had collapsed. And now Zuckerberg, who isn’t known for his charisma or quick-witted stage presence, would be grilled by professional grillers. The whole thing felt to Facebook roughly like watching the father of the bride at a tense wedding, refilled glass of chardonnay in hand, slide up to the microphone to give a toast. It could go OK. It should go OK. But it might also go horribly wrong.

Once the hearings started, though, according to numerous Facebook employees asked about their reactions, everyone at headquarters started to calm down. For one, it became immediately clear that many of the senators didn’t actually know what Facebook does. “I was personally surprised by how ill-prepared the members were,” one Facebook executive told me. “Once it was clear how bad it was and how mismatched they were, everybody had this awakening: We have made some mistakes, but these guys know even less.” Numerous people at the company passed around a meme in which Chuck Grassley (R-Iowa) putatively asked Zuckerberg, “Mr. Zuckerberg, a magazine I recently opened came with a floppy disk offering me 30 free hours of something called America On-Line. Is that the same as Facebook?”

After Zuckerberg finished his session with Cornyn, John Thune (R-South Dakota) interjected that it was time to take a break. Thune may have had the most power over Facebook in the room—he oversees the Senate Commerce Committee, which in turn helps oversee the Federal Trade Commission—and he may also have the best jawbone. But Zuckerberg responded that, actually, no, he was fine to keep going. “You can do a few more,” Zuckerberg said. He wasn’t worn down.

In Menlo Park, there were cheers from some employees. According to one who was watching a TV nearby, “It was like magic.” At another spot in Facebook’s offices where senior executives had gathered, people started laughing and smiling. The toast was going just fine. Nothing was going to go horribly wrong. Meanwhile, employees had their eyes on the stock ticker, which, for the first time in a while, had started to turn upward.

Shortly thereafter, Dean Heller (R-Nevada) asked a question without an easy answer. “Do you believe you're more responsible with millions of Americans’ personal data than the federal government would be?”

Zuckerberg had a choice: He could weasel his way out and say the answer is hard. He could throw out something patriotic and muddled. But he decided to do something simple. He just said, “Yes.” Then he paused and moved on to talking about something else.

It was another moment of magic, a Facebook employee said. “The mood totally changed internally.”

Some Bad Reviews

Zuckerberg didn’t impress everyone this week. The New York Post dubbed him “The Social Nitwit.” At the TED conference, Facebook was hammered repeatedly, and one speaker, Jaron Lanier, declared, “I don’t think our species can survive unless we fix this.” People made fun of him for sitting on what was dubbed a booster seat. Those perhaps seeing Zuckerberg for the first time were surprised that he can appear like a humanoid. Trevor Noah said Zuckerberg must “have sent a robot version of himself.” Jimmy Kimmel declared that he “almost even managed to replicate a human smile.”

It’s unlikely, though, that Zuckerberg cared much about the cheap shots and the jokes. He surely noticed that the value of the company rose by about $17 billion during the hearings, making him more than $2.5 billion richer. And in some ways, the most important part of the hearings was to calm his restive employees. In recent weeks, working at Facebook has come to seem a bit like working at Goldman Sachs in 2008. The most important challenge for Facebook is employee retention: Despite the billions the company makes and the kombucha shots it serves on the corporate roof, competition for engineers in Silicon Valley is severe. In recent weeks, Facebook has seemed weak and easy to raid. One employee even boasted publicly of quitting.

And if your metric is employee morale, Zuckerberg’s testimony was a success. Early in the Senate hearings, Orrin Hatch (R-Utah) pushed Zuckerberg on why the company doesn’t have a subscription model. Zuckerberg responded carefully and cautiously. Hatch then asked, “Well, if so, how do you sustain a business model in which users don't pay for your service?”

Zuckerberg responded, again, with a smile: “Senator, we run ads.”

Since then, in Menlo Park, numerous Facebook employees have repeated the mantra in meetings, joking, “Senator, we run ads.”

How the Ad Business Works

That isn’t to say the hearings went over perfectly, even at home. One mystifying thing to employees was that Zuckerberg frequently seemed to come up short when asked for details about the advertising business. When pressed by Roy Blunt (R-Missouri)—who, Zuckerberg restrained himself from pointing out, was a client of Cambridge Analytica—Facebook’s CEO couldn’t specify whether Facebook tracks users across their computing devices or tracks offline activity. He seemed similarly mystified about some of the details about the data Facebook collects about people. In total, Zuckerberg promised to follow up on 43 issues; many of the most straight-ahead ones were details on how the ad business works. It’s possible, of course, that Zuckerberg dodged the questions because he didn’t want to talk about Facebook’s tracking on national TV. It seemed more likely to some people on the inside, however, that he genuinely didn’t know.

Why was this? Inside Facebook it was simply seen of a sign of something that many of his colleagues know: Zuckerberg is much more interested in product and engineering than he is in the business. His former speechwriter Kate Losse told me that she thinks he did well. But she too was struck by his inability to answer questions about the details of the way Facebook makes most of its money. “I genuinely believe that he doesn’t care about ads.”

Zuckerberg’s marathon testimony also didn’t close out questions about some of his company’s biggest threats. Zuckerberg did not give thorough answers (and the congressmembers did not ask thorough questions) about the extent of Russian operations on the platform. It is still entirely possible that we will, in due course, see the threads of the Cambridge Analytica and Russia stories converge. If that happens, the company will have to deal with something much darker than even the mess of the past few weeks. It will mean, in short, that the data—and even the private messages—of trusting Facebook users ended up in the hands of a foreign adversary trying to manipulate a presidential election.

And there is still the looming issue of the 2011 FTC consent decree, and whether Facebook violated its terms by not acting reasonably to protect people’s privacy after it learned about Cambridge Analytica’s data gathering. An investigation is ongoing, which Zuckerberg did little to put to rest. It could cost the company billions.

Still, back at home, the troops were happy. On Thursday, the day after the hearings ended, Sheryl Sandberg was supposed to address the staff in a company-wide Q&A. Instead, Zuckerberg returned to Menlo Park and answered questions in person. “It was a Mark lovefest,” one employee said.

Facing Up

Read more: