I think the allure of javascript is the idea that you can use sparse server resources and have your software mostly run on the client side.
I’m resistant to using php, because I really don’t want to have heavy server resources, but if I were building an app that used heavy server resources anyways, I would be open to php.
That's certainly one appeal of JavaScript, but also consider that the client being a browser means you can run JavaScript on uncountable numbers of devices. And since the introduction of Node there's also the appeal of being able to write in one language for both server and client.