If you want a reason, go look at the Gitea project. They use Go templates, which are a lot like PHP. Depending on your definition, it could be "just fine." But also, you get a lot of issues that remain unsolved, such as the 77 comments in [1]. User interfaces are not meant to be handled on the backend in my opinion. When you try to do that, you get issues unless it's a system that's designed for doing the exact same computations on the frontend too (isomorphic like NextJS).
[1] https://github.com/go-gitea/gitea/issues/5937