Earlier quoted context omitted.
Consider typical Medium blog post. If by chance you block certain actions, you'll see it spin ridiculous amount of CPU, trying to sent tracking data all the time over graphql. Some tracking systems injected (often without developer involvement, using so-called tag managers) will send your mouse position and clicks. Through tag managers, you can easily end up loading 50 different scripts, often compiled with attendant…
I guess. The fact is, modern javascript is FAST. And with http3, and compression, you can make things load really REALLY fast. Much faster than in 1994! And you have things like tree shaking where you can make the js tiny. Not speaking about wasm, that’s even faster, or putting things to web workers. Modern CSS is so easy to use. And of course CDNs are nowadays all around the globe. Chrome debugging tools are pretty…
The developers are not in charge, usually, of what rules will be loaded into a tag manager by the marketing team (which might involve different sets based on URL or various other tracking data). The tag managers themselves and base ad auction and spyware stuff might be pretty performant, too - it's when you hit all those third party ads etc. that you might also see some shitty code.
But when many of those "features" are written assuming all the extra budget for themselves, well, things go bad fast.