Having something that runs in browser is a benefit, as I don’t need to install a dedicated app to program the unit.
My point is that MIDI is not necessarily synonymous with “audio”.
Another application is exactly the opposite of what you fear: offload audio rendering of some musical data to a well-optimized software synthesizer or a hardware synthesizer, via MIDI.
Now onto why a browser is a bad place to do this. Your audio subsystem supplies a buffer to you (or you supply a buffer to it, depending on OS) and you need to fill it in a fixed amount of time to avoid a buffer underrun, or increase the buffer size. At a 48kHz sample rate and a buffer size of say, 512 (default on MacOS) you have ten milliseconds to fill it.
But you don't get all that time. As buffer sizes get smaller, the dominant factor becomes how much time it takes to get data from kernel to userspace, and from userspace down to kernal. In a browser now you have to go from kernel to user space to sandbox down to user space down to kernel.
So getting low latency MIDI input to a browser, rendering it to sound, and getting it back, is basically a terrible use case scenario in terms of latency. Yea you can do a lot when you don't care about latency, but then the question is, why would you care about live MIDI input if you don't care about latency?
Firefox's audio engine (or at least WebRender) is actually fairly impressive - I've heard things that they can get sub ms latency. But I don't really trust that you can do that and do serious audio processing, which any non-sine synth is going to entail.
Interestingly, browsers are capable of native audio and video playback for years; somehow it wasn't such a problem, given their relaxed requirements for latency.
Then again, I'm not expecting anyone to use my app to do a performance in Carnegie Hall. I want kids and other mere mortals to be able to have fun while learning and making music.
You don't have to use it, of course, but I'm genuinely curious why you'd want to deny this sort of thing to others.
Sure, it's hard, but take a step back and midi is just a more sophisticated keyboard/mouse (re input, the output is just a few pixels).
Most musicians are ok with as much as 10ms latency while playing. That's plenty of CPU time. 1ms is about how long it takes sound to travel 1 feet. So how far away you are from your speakers may give you more latency that whatever current CPUs are capable off.
I'm not arguing to make web DAWs and audio plugins. But for learning piano it's perfectly fine.
Of course that has nothing to do with midi.