Because of Privacy concerns! The thinking is that few people would enter their email and email password on a 3rd-party website, having it as a downloadable software ensures the privacy of users
On a desktop app, you can see what kind of request the program makes and which servers it contacts. With a webapp, you'll never know what the app does.
You can do the same in your browser by opening the developer tools and in fact it comes built in to the browser whereas on a desktop you'd have to install another app like Wireshark/Fiddler to see those requests.
It's not possible to make a web-based email client that speaks to the IMAP/SMTP server directly. Only a "native" (electron can do this) client can use those protocols.
You can still see to which servers the software connects, ostensibly the only servers would be those for sending and receiving your emails. If you're feeling particularly paranoid you could enforce this behaviour using a firewall. For web based email anything could happen and you would have no way of knowing, even after the fact.
This doesn't make any sense as a motivation, let alone the primary motivation, to build a native app in the age of web apps. There's no real difference in security here and the user perception gain is marginal and ephemeral.
Running it locally is fine, but a hassle if I need to access my mail on someone else's hardware (or my phone). I think this is one of the main reasons Gmail is so popular.