In both worlds, the problem is who a site owner decides to grant access to your shopping session, not the fact that access can be granted at all. Or how would you ban them from e.g. insecurely transmitting your card data to their payment service processor on their backend? You just wouldn't see it.
> deliver just data and my browser decides what to do with it
Code is data and your browser decides to execute it. A toy example, but HTML+CSS is Turing complete. The problem thus isn't that it's "code", but rather that it's not properly sandboxed.
> my shop browser decides how to operate with the catalogue in a way I want
Are you making a case for built-in components for e.g. sorting and filtering and what have you? To me that's just way more clunky than having an actual programming language. Even PDF, a static document format with no real user interaction, has a programming language (PostScript) embedded.
So in my view, the problem with JS isn't the features of the language itself, rather that the standard library has too much power, to make requests and access your microphone and stuff like that.
But even then, people want to use their computer to do video calls, and whatnot. And I for one much prefer using Zoom or Teams or such in the web app, instead of downloading the app version. Precisely because the web app is more tightly sandboxed.
Like yes designing a generalized shopping experience is possible. It is also going to limit the long tail of features OR become such a huge and bloated spec that it will make things way worse. Imagine Temu but for all the shops.
Besides, doesn’t your browser and OS come from some third party? How much do you trust them to be bug and backdoor free? Or do you have your own browser and OS that you know for sure can do all this and you have verified?
They weren't saying websites should be completely static, just maybe they shouldn't run attacker-controlled code.
You'd still have to trust the hardware, OS, browser, and now an LLM too, but that threat model could be preferable to running arbitrary (especially 3rd party) Javascript.