Same with PHP for the serverside.
You're not going to find many languages more supported universally than PHP. Apache has a module, Nginx has FastCGI support. Web hosts are going to have it enabled and running for every client. As for NodeJS, Rails, Python, etc? You'll be lucky if they even have it installed, let alone configured correctly. Their control panel may not have sufficient control over the module, you may not be able to install certain packages, etc. What then?
Sure, PHP is a quirky language. So is JS. So is Python. So is Java.
Backwards compatibility is a pain, but a requirement. Implementation and choosing what to drop is a different story, and I can fault the PHP developers for that, but with PHP 7 it's becoming a lot more sane.
Truthfully, any language has its faults. But the majority of them aren't game-breaking, and programmers can and must work around them in any language. It's up to the skill of the programmer to make something beautiful regardless of the language they're using.