Re: Stupid web developers
That's the bad part of it. The reason why it's done that way may surprise you. It's to reduce the bandwidth for the server, and to reduce the cache space on the client. "How?" one might ask. Well, I will tell you:
Taking my website for instance, it uses jQuery 3.3.1. The file is 84.8kb. I also use Bootstrap 3, which has multiple files totaling 1.56mb. Now since I'm a software engineer, I have all these files and frameworks locally on my server and sends them to the client without having the client pull anything else from anywhere else. So for every client that connects to my server, I'm sending the entire framework to the client. That takes up network bandwidth. My network bandwidth. So websites, in an effort to save on that bandwidth, have the clients pull the frameworks from the framework publishers, thereby saving bandwidth on the server. Furthermore, the browser caches files based on where the file came from. So if 100 websites all use the same frameworks from the same publishers, then the client only needs to download it once from the publishers for the 100 websites that use those frameworks. That saves bandwidth on the client, the server, and the framework publishers. Furthermore, it reduces the amount of disk space used on the client. The reason for this is that only one copy of the framework is in the disk cache. On the flip side, if each of the 100 sites sent their own copy of the frameworks, the client would have 100 copies of the same files on their computer.
That is the main reason why websites pull files from other servers. It reduces total bandwidth consumption on the internet and makes things faster (which is a good thing). As you pointed out, now the framework publishers can track all the users of those 100 sites. So like everything else in life, there is a trade off.