Why do it? Because they can?
Without Javascript it would not be as easy.
With the help of the "modern browser" and its defaults, its like shooting fish in a barrel.
The original HTTP/1.1 RFC has some reasonably low limits on simultaneous connections; todays ad-sponsored browsers ignore them.
Turn off Javascript and the web marketing Rube Goldberg machines begin to fail.
Most web pages try to coax users into turning on Javascript, or even installing a different browser.
At this point, a web developer will jump in and try to convince us the web cannot work without Javascript.
This is false. There was e-commerce on the web before Java1 or Javascript.
1. Java began life as a language intended to be embedded in devices. It was repurposed to be a scripting language for the web. That was a failure.
Javascript is a "success" but in the ways that it is abused, it can be every bit as annoying as a 1990s Java applet.