The simple reason is that, on the modern internet, unless you're
running a subscription service then some level of advertising is about
the only reliable way to cover the bandwidth and hosting costs.
My sites are provided for the public benefit, free of charge. The popularity of some of the downloads means that a dedicated, unlimited bandwidth server is pretty much the only option - and that's expensive to run. Ads don't pay very well, but they do manage to cover the costs of the server, and without them, I just couldn't afford to run these sites.
There's an argument that says that if a site is good enough, then people will donate or pay to subscribe to it. Sadly, my experience is that on the modern internet, that just isn't true. We expect the content on the internet to be free, and we expect to receive something for nothing. By and large people don't donate, even for sites or software that are saving them large amounts of real money.
If the ads annoy you, I have a policy that, wherever possible on each site, the more intrusive ads can be removed by simply registering a free user account, and logging in with it. Usually there are benefits to having an account too - like enabling more ability to interact with the site. (Unfortunately, I'm having a problem with the user registration module on this blog site, so I haven't been able to do that yet here).
So please - support struggling websites: don't block their ads, and once in a while be sure to click on the ones that interest you. It doesn't cost you anything, but it helps us to keep going.