Viewers are not the customer of the TV networks—advertisers are.
For a long time, those two groups had similar goals, though. Advertisers wanted lots of viewers and viewers wanted shows that lots of them wanted to watch. So the TV networks used ratings as a proxy for advertiser happiness and there wasn't much of a problem.
The same thing was true for newspapers. More local readers meant local advertisers were happy.
Both newspapers and TV networks suffer when mass starts to disappear. Viewers seek out what they want to watch, as opposed to what the masses want, and advertisers are left to scramble for eyeballs.
HBO turns this upside down. The viewers ARE the customer. HBO can program with confidence, because there's no question about who they are working for.
Search engine advertising works because the search engine knows the searcher is going to leave the site ...