It's the ONLY choice for client-side web. As I said twice before, that's the one place nothing is worse or better - because you have no other choice.
You seem to forget that, for many years, it was not the only choice. JS handily beat the competition. You may be too young to remember those early days, so I won't hold it against you.
Since neither iOS nor most Android devices run Java applets, that means MOST users today won't run them. A "solution" that won't run at all for most users isn't a solution. You can't say "Java and JavaScript would both work, but JavaScript would be better".
Again, you forget your history. Java in the browser was effectively dead long before iOS and Android hit the scene. It lost out for a reason, after all. Java had its chance, there was more than a little excitement surrounding it, and it still failed miserably.
If you're advocating JavaScript as a server-side language, well that's just silly.
I'm not advocating anything, just calling out your opinion as unsupported and uninformed. (You've never explained your reasoning. I assume that's because there is none and your just repeating a meme.) Still, you'll find that JS on the server is getting quite popular. Even sites like PayPal have adopted it. Call me crazy, but I'm pretty sure they're well-aware of the alternatives and selected JS anyway.
If a key component of the language behaves in unintuitive, surprising, and troublesome ways, that's a valid criticism.
In the case of this, it's only surprising if you know absolutely nothing about the language. If it behaved the same was that it does in a language like Java, it wouldn't make any sense at all. Once you understand the basics of the language, it behaves exactly as you would expect. As I said before, that criticism stems from pure, unadulterated, ignorance. For whatever reason, people seem to think that they don't need to learn the language before using it -- even though it's dramatically different from other languages.