There is a really telling and truthful scene in the Social Network movie about that, when Saverin wants to introduce ads and sponsoring opportunities way too early and Zuck refuses.
Former-employees-turned-critics like the author of the "Chaos Monkeys" book also agree with that : I'm paraphrasing but he says 2 important things : 1) that the ads sales organization within FB often felt neglected because Zuck initially really, really didn't care or understand this industry. Sheryl basically ran that, and still does to some extent 2) They were really serious about "make the world more open and connected" mantra internally. It's a genuinely mission driven company (and I'm sure recent controversies must have made huge waves)
I'm a former Facebook engineer. For sure, and especially since the IPO, it's definitely become an ads company, no point denying that. But it's also very fair to say it wasn't built to be one.
Same goes for Google really : who believes Larry & Sergei were thinking "let's build an advertising behemoth !" when they came up with PageRank in a Stanford dorm ?
Most ideas that became big weren't built from the get go with money as the end goal. That's just what follows after success.