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.
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.
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.