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.