For a so-called templating language, PHP sure falls short, and thus has a plethora of ad-hoc, informally-specified, bug-ridden, slow implementations of half of many other templating languages implemented in it.
My point is that PHP pretends to be a templating language, then falls flat on its face, so people end up implementing much worse (Smarty, MediaWiki) or sometimes even better (Twig) templating languages on top of it.
In other words, it's simply not true that PHP's "declarative "templating" is the easiest, simplest, most direct way to generate html", or there wouldn't be a need for Smarty, the MediaWiki abomination (which is 17 years old but still widely used on 29 million pages), or Twig.
I'd say "to hack together something half-assed that barely works, but does provide the feature" perfectly describes the PHP development process itself.