Your example assumes that you run things locally, which is seldom the case when it comes to Javascript/Webassembly.
The issue is depending on someone elses computer to run somenoe elses software. Which is also entierly different from communicating with a server.