Microsoft is running one of the largest corporate espionage operations in modern history. Every time any of LinkedIn’s one billion users visits linkedin.com, hidden code searches their computer for installed software, collects the results, and transmits them to LinkedIn’s servers and to third-party companies including an American-Israeli cybersecurity firm.


Yes, because web browsers, under current web architecture, allow this.
This is entirely my point.
They will always allow it as long as you have javascript or any other code.
That much is true.
How would they prevent it? If they allow your app to read a value client side, it can do whatever it wants with it, including sending it.
If your app needs to present different behavior based on user settings, it needs to read it.