It sounds more like Rust gave you that choice, because it would have been just as good if the rust code transpiled to JS. I’m not knocking WASM just pointing out that you’re not praising any particular qualities of WASM, but of Rust.
Yes, but there's also a reason why the Rust -> JS route never took off.
Wasm is positioning itself as the common runtime for a lot of frontends (term borrowed from LLVM). You could see it as some sort of spiritual successor to the JVM, and it may actually accomplish the goal of "Write once, run anywhere" to a much greater extent.
(Btw, I am not criticizing Java here, I've worked with it and the JVM and other derivative languages for almost a decade and they all are quite valuable tools!)
What is this reason?