That may be true today but PHP is old in web terms, when PHP began to become popular it was at a time when it had little competition that offered the same ability to build dynamic web pages with relative ease. PHP spent enough time at the top of the web dev heap to build up a substantial network effect. The comparative advantages of other technologies, large though they may by, are not yet enough to push PHP from the top spot.
Exactly. My career started back then, and there really wasn't a lot out there:
* CGI (mostly done with Perl).
* mod_perl (a huge ungainly mess)
* ASP (no thanks, not a Microsoft guy)
* Various proprietary things
* Various niche players (my own mod_dtcl [later Apache Rivet] was faster and IMO, nicer than PHP, but never got more than a modest amount of traction).
By the time I even started writing mod_dtcl, PHP was already pretty widely used, and we were using it in production at the company I worked for, and it was certainly better/faster than doing things in Perl CGI's.
These days, I really, really, really don't like having anything to do with PHP after having dealt with too many unholy messes, but I can't deny that it got some critical things right at the right time.