Automating writing HTML is also easy as you can just write to stdout directly, and if you are comfortable writing HTML by hand directly this is a simple uplift to automate things you did by hand.
This is why jQuery was so popular because you could just add it in to this vanilla HTML in a nice way. You didn't have to stand up some JS scaffolding and toolchain to get there. Even jQuery can get you to a situation away from WYSIWYG because you don't just need to render the DOM you now have to have a JS runtime evaluation. In some contexts you have something that can write a DOM from HTML but you have no JS, it was only when chromium embedding became popular and normalized you got both the HTML and the JS together, for a long time you only got the HTML.
Finally, direct HTML will work as-is forever but JavaScript is a moving target. Some terrible websites I wrote in raw HTML work today after 20 yrs (admittedly 1024x768 optimizations didn't age well) but many JS things I have written have not had that longevity or require standing up a long dead development framework to get going again.