Discord isn't packaged as an Electron app simply because it pretends to be native, but because it has native parts that aren't available in the web version.
Why do you think that is?
The funny part about this complaint is that you can literally just use the web app if you hate the desktop Electron app so much.
We would be lying if we did that. Electron was never, ever a good solution. It was something solely used by devs who prioritized their own ease of work over the actual user experience, i.e. bad devs.
Acting like this is a decision the ICs make is disconnected from why electron is so prevalent.
Someone would have been able to disrupt that market by making a much better chat app since Elecron is so bad for user experience.
Luckily in the modern era we have invented language models, which allow us to expend vast resources on text generation instead.
Election predates WebAssembly by 5 years and hit the scene only one year after Rust was first created.
And just like JQuery, its time is coming to a close as better frameworks are available now that weren’t available back then.