That also has some downsides, of course, as people have been hating on it since it started.
But, as you've pointed out, it's hard to argue or dispute its dominance, so it must be doing something right. No language is perfect, they're all a series of tradeoffs that you have to discern, then decide on the best tool for the job.
It appears accessibility goes a long way, and low barrier of entry to "make it your own" is worth something.
Most CMS are installed via auto-installers (e.g on cpanel) and are also managed by mostly nontechnical users using shared hosting! So… if your CMS is written in Perl or Python with tones of modules required then you’re out of luck when it comes to adoption.
For a PHP application (CMS or anything else) you rarely need something more than „upload these files on your FTP”.
For other languages you need access to CLI. And know-how on how to do this. And (sometimes) elevated access to install stuff.