A thought experiment: suppose my company makes and sells shoes. We're a shoe company, right? Then one day some soda company calls us and says they'll give us money (a generous $10 a pair, our pairs sell for $100, cost $90, hello double profit) if we put their logo on the tongues. Sure, we try it out, shoe sales don't seem negatively affected (they're great shoes) so we keep it and keep taking money for the ad. Basically one guy at our factory coordinates with the soda company to make sure we're paid, and makes sure we have logo supplies and that each tongue has a logo on it, but the rest of us are just focusing on making and selling shoes. Are we still a shoe company? I think yes. What if for every logo'd $100 pair of shoes we sell the soda company pays us $50? $100? What about $200, much more than the cost of the shoe for their ad, such that we start giving away the shoes for free? Still a shoe company then? I still think yes.
Your shoe company is in the business of selling ads at the point where ad revenue exceeds revenue from the manufacture of shoes. The shoes become the medium of delivery of the ad, but the company would as likely give away slips of paper with the logos on if the ad revenue justified it.
A better analogy, in my opinion, is to that of a company that makes billboards: they sell ads, delivered by billboard. They'd stop making the billboards if the ad revenue stopped coming in. Likewise Google would stop working on anything ad-related (and probably switch focus to GCE) if ad revenue dropped appreciably.
Maybe it's a difference of opinion on the purpose of companies. For some people the only purpose of a company is to make money, regardless of how. But for my shoe company, the purpose is to make great shoes for people to wear. Even when the ad revenue is huge, the company wouldn't just as likely give away slips of paper with the logos on it if the ad revenue justified it, because we have no interest in making slips of paper, we just want to make shoes. Similarly, why is the soda company continuing to pay us such high ad revenue unless they think it's justified on their end? Couldn't they make their own shoes, and sell or give those away instead of having to pay us? Except they're in the business of making soda, they have no expertise or desire to make shoes. If the ad revenue dries up, well, we can go back to trying to sell the shoes instead of just giving them away.
The analogy with the company that makes billboards is good if you're trying to point out the fundamental difference between an ad company (there aren't that many of them, despite many companies being funded by ads) and a non-ad company. The only purpose of a billboard company is to make billboards that people see ads on. There's no other reason to make billboards. The day to day of most employees will be about how to most effectively design and position their billboards for better ad delivery and finding advertisers to pay, while a relatively small amount of employees enjoy focusing only on the construction process. The CEO probably doesn't even care about billboards, they just found a nice way to make money.
If Google's ad revenue dropped a lot, there would definitely be a change in focus, but they wouldn't kill off search. They'd probably put some more people on trying to sell Enterprise Search. Google, being a tech company and not an ad company, has tech it can try to sell when the ad revenues go away. An ad company has nothing else. That's the big difference.
What if ad income were so large that the shoe company just gave away your shoes and relied solely on the ad income?
This is where Google and Facebook are, and that makes them ad companies: Their business and design decisions are driven primarily by the objective of increasing ad income.