I personally despise coding in PHP as much as anyone, but it has been used for a number of hugely successful projects, including Wikipedia and Facebook (that latter has even written a transpiler that converts PHP into C++). PHP is the bog standard on a LAMP stack so you know it will run on any environment, and there is a huge pool of programmers who know how to code it. Those are nontrivial reasons.
If you consider Wikipedia a good example of what PHP can do, we have irreconcilably different quality standards.
I think the technical debt of PHP is a huge reason why development of the software behind Wikipedia hasn't fixed any of the huge issues in the last 5 years.
Oh, I don't know... Maybe because of easiest imaginable deployment scheme? Comprehensive stdlib and lots and lots of libraries and bindings for everything? Its forgiving nature, which makes it try very hard to do what programmer meant instead of dying with cryptic error messages? Or possibly because of bazillion other legitimate reasons people have for choosing to use it...
Languages are just tools. Some are better than others for a specific task. This is a fact. You choose the language for a given task because it fits the task better than other options. That's all there is to it.
I don't currently use PHP, but I acknowledge that there are situations where using it makes sense. I'm just not in one of those situations in present. Saying that PHP is a bad choice in every situation is worse than stupid: it's simply wrong.
"Its forgiving nature", like VB's "On Error Resume Next" and JavaScript's automatic semicolon insertion, is not an advantage. Debugging with cryptic error messages is better than having no idea that the program is silently doing the wrong thing.
Its standard library is no more comprehensive than those of comparable languages.
The only advantage left, then, is the same one all the sibling comments bring up: it's already installed on the server.
So the question remains: Why would anyone who has a choice and knows that other languages exist ever use it for anything?
I'm a ruby developer myself (and also a huge advocate of ruby) I use PHP to mashup quick weekend prototypes to test stuff like third party API's, mini dashboards, etc. Because, nothing beats the convenience of uploading a simple PHP script to a server via FileZilla. It's what you build with the programming language that matters more than the language you use. And no, I refuse to be shamed for my programming language choices.
I know it's "cool" to hate PHP, but anyone asking this question obviously hasn't used it. It's a tool that solves problems fast and cheap. It's not for every application but it fits for some VERY well. And most of PHP's problems are the newb programmers it attracts, just like JavaScript. The language itself has tons of quirks but you can write good PHP just as well as anything else, and you can solve certain problems very fast with it.
The thing is there are better languages that solve the same problems PHP solves at the same speed or faster. This is why Ruby become so popular.
Javascript is a sad story though, it's an abysmal language (even with ES6, though that does make things better) but it enjoys a monopoly over the browser runtime space.
I think asking why anyone would start a new project in PHP is a very reasonable thing to ask.
If you want quick and dirty there is Ruby + Sinatra, Python + Flask or Go + Martini.
All of which are safer, have less 'quirks' as you say and are all faster.
None of them require any more work than the current PHP alternatives.
PHP may be superior to some languages in some regards, but it's definitely no longer the king of the hill of prototyping languages.