You could do cross platform UI with Java. It was slow, ugly and poorly integrated with the rest of the OS unless you put in extra effort for each platform.. Just like applications running in the browser today.
I struggle to conceive an alternative. I don't want to download a native app every time I want to access my bank account or browse Twitter, for example. Web applications, despite their glaringly obvious flaws, are undeniably convenient.