There's no need to trust some giant blob of JavaScript to convert a data document into a usable web page. Just the native XSLT engine (using the same XML processing pipeline it uses for all the other XML it encounters).
A web of XML documents could all be easily viewable by a web browser but the exact same data can be processed with other tools. There's a lot of old web API ideas being recycled (poorly) with JSON to service AI tools today. The web could have already been nicely structured data easily ingested by autonomous tools (AI or not) while at the same time being still perfectly accessible by graphical web browsers.
But no, everyone decided that because Enterprise XML Usage was icky so they needed to completely throw out XML in favor of a much shittier serialization format.