Most content is garbage, but there exists content you want. If it didn't exist, you wouldn't be looking for it, and you wouldn't see any ads.
Ads are just the most friction-free way (from the reader's point of view) to pay for it. You don't have to install anything or connect your bank account. There's a lot wrong with that, including the proliferation of crappy content, but it does fund a lot of the genuine content as well. Both readers and writers want a better way, but results are mixed at best.