Putting things on a screen was (is) stupidly simple.
That's the whole thing. It's not the types or npm or whatever. It's that you could start with C/Python/Java and spend your first 6 months as a coder printing and asking values on a dark terminal (which is something a newbie might not even have interacted with before) or you could go the html/css/javascript route and have animations moving in your screen you can show to your friends on day one.
Everything flows from that human experience. UIs are Electron because creating UIs for a browser is an extremely more universal, easy and creative-friendly experience than creating UIs for native apps, particuarly if JS is your native language for the previously stated reason.
The industry failed to adapt to the fact that the terminal wasn't any longer the reality of computer users, and the web kinda filled that niche by default.
Also, React was an answer to the advent of mobile phones, tablets, smart tvs, and basically all the explosion of not-a-desktop computer form factors. You could no longer assume your html was a proper format for everything. So you need an common API to be consumed by a mobile app, a tv app, a tablet app... react was the way to make the web another of the N apps that use the api, and not get special treatment. The idea made sense in context, back then.