There must be a difference between paying for the infrastructure and paying for the content (including the code).
It's easy to imagine a future where the infrastructure is something analogous to a public good, like clean water. The infrastructure is agnostic to the content.
The content, on the other hand, is a product of a massive, churning, never-ending process of intellectual work. Ads, for the most part, provide the underlying economic incentive for that work.
And the dirty little secret of all that ad-supported creative content? Its value is minimal. Truly minimal. Often low quality, incoherent. If it all went away tomorrow, I would hardly notice.
That it is nevertheless so popular is something of a paradox. I know I sound ridiculous, but at the core, I'm beginning to believe that the fact that advertising is as powerful an economic force as it is, is a reflection of the fact that people's lives are more boring and devoid of meaning than we often admit.