> This is used for namespacing and to ensure forward compatibility (since no elements will be added to HTML, SVG, or MathML with hyphen-containing local names going forward).
So things that work today without a dash might break in the future if <badge>, for example, becomes a standard HTML element.
Developers like to copy/paste UI component example HTML from Tailwind/Bootstrap documentation, they like predictability/portability. They don't want a project that's half HTML and half HAML...ie, Vue/React using HTML/JSX vs 50% of Rails views in HAML, 50% old ones in HTML.
Just like how using Vanilla JS is much smoother and reliable than using the latest wrapper framework.
I think it's worse than, e.g., typical yaml files because the nesting is deeper.
Stimulus is in the sweet spot for that. Both lean (as opposed to bloated), and not too low level, so that using it does not lead to verbose code. It is one of the very few JS frameworks that IMO do not contribute to JS proliferation, but actually work to reduce the amount of JS written.