I agree, I wouldn't classify PHP as "not writing HTML by hand". But that's not what I'm talking about. Most websites in the last 20 years have heavily leaned into client-side rendering, picking up with jQuery circa 2006. It's only recently with htmx that the pendulum has started swinging back toward server-side rendering.
I was around for all of this. Websites using jQuery were almost all using hand written HTML or HTML generated by something like rails web templates or PHP.
SPAs didn’t go mainstream until almost 10 years after 2006. And even at their height they never represented the majority of all websites.
But also most SPAs aren’t any less HTML by hand than using PHP templates are.