That’s mostly because a lot of devs have legacy gauges written in C++ (where C++ is not the best fit for in the first place). For gauges and other 2D stuff HTML/JS actually make a lot of sense. As extra sandboxing ability they added WASM.
Sure you probably get C++ sandboxing to work, but you would have to write a completely new virtualization engine and compiler in order to get there. Choosing WASM from a development perspective makes a lot of sense.
Now, is the current implementation without its flaws? Of course not. There are a lot of improvements needed, but as a framework concept, there’s not much wrong with it, IMO