The idea that web assembly is not meant to be the platform to run primitives on stems from the political and technical approach initially used to get web assembly inserted into browsers. The basic concept is that it was much easier for people to accept if it was "only the compute part" and also practically speaking only made sense to leverage the extensive UI and other functionality of the browser. Which made it very easy to say it's just for compute.
It's amazing that people are still stuck on that. That just goes to the power of PR and poor adaptability of the average brain. Even Brendan Eich was in a web assembly issue wondering when they were going to add some kind of minimal UI functionality.
Look at for example the web assembly shell and WASI to see how input / out has reluctantly been added to make it so these systems can have some utility on the server.
The only real reason that there hasn't been something like a serious extension to WASI for UI things is because people accept the status quo. We will forever ship a large monolithic overlay operating system controlled by a single megacorp and everyone will use that.
Except for one "competitor" which actually is also mostly controlled by the same megacorp.