There was a very compelling vision for the web, by Doug Engelbart and others in the 60's and 70's. Unfortunately, because of the computing culture's attitude of forgetting even the recent history / understanding what foundational work was done (like real scientific fields do!), the web folks didn't have a lot that context.
Alan Kay, in many of his talks, has discussed how the browser should really be more like an operating system kernel. The web is a mess and we can still build interesting things with lots of hacking & engineering, but it's fallen short of the original vision. And now we're locked into the tooling we've built.