Electron is a sub-optimal solution to the fact that desktop development today is horrible. You either have to write your app twice (or three times if you want Linux) or use Qt, which limits you to either C++ or this weird langauge/ecosystem nobody knows called Qt Quick.
Electron lets you write desktop apps that work decently well everywhere in a language you already know.