In those cases, the user is not the customer. The old saying goes, if you're not the customer, you're the product. Google, FB and the like monetize users through advertising. The product is not Gmail or Facebook. It's advertising to their audience. You are the audience. Advertising is the product. And so the broadly applicable advice is still relevant. But you know this. In that light, ask the question - who is the customer and what do they want from the product? The customer is the advertiser, and they need to want what FB and Google and Twitter have to sell. You're confusing the value that the users get (which is how they build and maintain the audience) with the value that the customers get (advertising to that audience).
And besides, how many startup founders are REALLY building the next Google or Facebook right now? Most are building something much more modest, in which case, in those cases the user is most likely the customer and so building something they want to buy is important.
Who said anything about customer? Your advice is to build something that people will pay money for. My point is you can build something where users come first, and perhaps the "customers" don't show up until later. You can have great product metrics before you have a single customer. In many cases you can't even serve the customer before you have great product metrics. And I think startup founders should always be thinking of building the next Google or Facebook? It is sad to think otherwise
And besides, how many startup founders are REALLY building the next Google or Facebook right now? Most are building something much more modest, in which case, in those cases the user is most likely the customer and so building something they want to buy is important.