@bjorndown
To give a very concrete example: imagine you want users to be able to edit rich text, select, copy, and paste in that.
On macOS, I would use an NSTextView. This class was part of the 1994 OpenStep specification and the 1994 functionality is most of what I want. Around 20 years ago, Apple also added spell checking as you type and a few other things. My interface to this is an object that implements the NSText protocol. Typically, unless I'm building something very complex, that's an NSMutableAttributedString. An attributed string is a class that wraps a string (the default NSMutableString won't have any problem for things under a few tens of thousands of characters, but you can plug in one more optimised for your use case if you want) and associates attributes with ranges.
The text view has some built-in shortcuts for things like bold and italic and for popping up a font dialog. It also has APIs for letting you control the current font from typing. You can get notifications on changes (after finishing editing, or after each character is typed). If you want to do something like parse a source file with some language parser that you've written, it's very easy to have a first pass that goes and attaches semantic attributes to the nodes and then a second that maps semantic attributes to fonts. You also have fine-grained control over things like hyphenation algorithms, grapheme cluster to glyph mappings, and so on. Again, almost all of that has been there since 1994.
In contrast, in the web, you have to build a load of this yourself. There's no standard rich-text editing view. You have to build something that takes keypresses and modifies the DOM. Copy works okay, but if you want paste then that's additional custom stuff that you have to do. Take a look at how some rich-text editing views work and you'd be horrified: they do things like render plain-text editing controls underneath styled text so that they can capture input.
The problem is not really the technology, it's the market shape. On OS X / macOS, there's a company that ships the widget set and everything below it. Users wanted the red squigglies for underlining so Apple added that to NSTextView, along with a dictionary service that let apps use either a shared dictionary or a per-application one depending on the use case. Every app benefitted from that. Similarly, in early OS X, scrolling in NSTextView was a bottleneck, but it wasn't NSTextView's fault: it delegated to CoreGraphics for putting glyphs on the screen and each glyph was a set of bezier paths that needed rendering with antialiasing. This was all done on the CPU. If you scrolled, the CPU would have to render tens of thousands of small antialiased beziers. So Apple added a caching layer on the GPU (with a silly name: Quartz 2D Extreme!). Now the CPU rendered each glyph once per font / size that's in use and this went in a texture. CoreGraphics managed that caching layer and the render-glyph routine became an instruction for the GPU to render a region from the texture into the window's buffer. Even low-end GPUs at a time could do tens of millions of pixels a second of compositing, so this was very fast and meant the CPU was doing less so the other things were not as squeezed for CPU time.
Imagine today the same requirement coming from the maintainers of, say, a React rich text editing control. They need the browser vendors to provide the feature. The browser vendors need the OS / windowing system vendors to provide the underlying functionality. By the time the platform people get the requirements, they're filtered: it's not 'what does the user want to be fast'. They can't say 'actually, we have this different API that lets you render text really nicely, but even if you exposed it in the browser, the way that this rich text control is written couldn't use it, you should change it like this', yet that's exactly the kind of bidirectional feedback that made these things fast on OS X (Windows was a bit weird in this respect because the Office team had their own widget set and didn't like Windows shipping things that made it easy to compete with Office).
It's a common problem in our industry: people at one layer in a stack build things to work around limitations in the layer below. People working on the lower layer then use those things to determine what they should optimise for. So you get local optimae where the new version of the platform is very efficient at implementing the unfortunate pattern that a previous version of the platform forced users to adopt.
And none of this is JavaScript's fault.