The journey of #javascript is the poster child of out of control #complexity. What started as tiny client side code to introduce some interactivity has eaten html itself (virtual #dom) and then metastasized also on the server side. A gargantuan duplication of functionality between client and server that eventually backlashed into the #htmx and #livewire type approaches.
When you throw in the explosion of mobile clients (with architectures controlled by a duopoly) you get to the lunacy of today.