XML/DOM representations of graphical state are a lot closer to the Unix ideal that we have in the command line. A big reason why the command line is often more powerful than a graphical interface is because the command line allows users to easily wrap around, extend, pipe, scrape, script, and translate interfaces.
HTML is the evolution of that ideal -- a statement that graphical interfaces should be as flexible and as manipulable as a command line interface.
https://news.ycombinator.com/item?id=24270960
Here's a thread from the w3 mailing list discussing possible scripting languages for HTML back in 1995[0].
And here's Tim Berners-Lee talking about running code in HTML in 1992[1].
You're simply wrong that running code in HTML is a perversion - that was envisioned as a possibility since the beginning, it just took time to manifest.
What wasn't intended was for only one scripting language to dominate. When the script tag was released in HTML 3, the hope was browsers would support multiple languages, which is why it had a type attribute, but that never happened.
[0]https://lists.w3.org/Archives/Public/www-talk/msg00099.html
[1]http://1997.webhistory.org/www.lists/www-talk.1992/0064.html
If HTML is no longer being used the way it was intended, is it unreasonable to request A.) A replacement, or B.) an HTML upgrade?
That's the hard part - any such solution has to compete with the HTML/JS/CSS ecosystem for free.
Flutter Web is attempting something like that I suppose. Not that I think it will take off.
It would be probably be a better idea to be more conservative with the adoption of new technology.
HTML was designed to be a way to create and link documents so that someone or a machine at one end of a distributed network could access it on a different network, not become an app platform. Everything else done beyond that is a perversion of HTML.
It would be interesting if there ever was a standard app container runtime that doesn't use HTML/JS/CSS. I guess that the last serious attempt at that were Java Applets which never took off.