I am one of those "stupid" PHP users. It's not the first language I learned, nor is it the last. I'm well aware of Python as an alternative for developing web apps, and I've tried it, but I really do prefer PHP.
One reason is flexibility in flow control. PHP has do ... while loops. Also, I can do "continue 2" or "break 2" if there is a loop within a loop, to continue or break at the outer loop. I'm honestly puzzled that Python still hasn't added these obvious and useful things.
I've asked Python types about this, and gotten reasons like "you shouldn't be doing that in the first place," which pisses me off and makes me want to stick with PHP even more. I mean, who the hell are they to tell me what I should and shouldn't do? This tradition of "I know better than you do" seems to permeate Python, and leaves a bad taste in my mouth. PHP gives me the freedom to do what I want -- and that includes doing mysql escaping badly. That's not a freedom I will use, but it's there nonetheless.
People are right to criticize PHP's mysqli library, but there are plenty of good wrappers available that hide the problems, or you can just use prepared statements exclusively and avoid the whole mess. Again, PHP doesn't preach at you with a "I know better" attitude, it just gives you all possible choices and lets you take it from there. PHP tutorials are wrong to teach mysql without teaching security and injection prevention, but that doesn't take away from the language -- there are bad Python tutorials out there too.
Also, PHP's tradition of having a standard installed system makes it trivial to ship code. If a certain class isn't part of the standard PHP installation, you package it with your app -- and you know for sure what your user's environment will look like. True, there are the configurable php.ini settings, but those are trivial to check and adjust within your code. With perl or python, one shared hosting company might have certain packages installed while another one does not, so companies shipping apps go insane trying to figure out what they're allowed to rely on. Users without root might, or might not, get to bring in certain things on their own. And if they can pull in the right packages, the process might be too complicated for the given user, or might require shell access which the hosting company disallows.
The fact that there are so many successful PHP apps running on shared hosting (wordpress, vbulletin, etc) is a testament to how simple the language made it to ship and deploy such apps. It's historically been easier for a webhost to support PHP than to support Python, so more of them do it. From the developer's perspective, you know a given PHP app will run the same on all installed sites since they all have the same base libraries. From the user's perspective, it's dead simple to deploy the app with nothing more than an FTP client. No need for root access or any weird tech stuff. From the webhost's perspective, a trained monkey could deploy PHP on a server -- not just today, but 10 years ago.
I hate to put arguments in my opponents' mouths, but so often I've heard Python types attack the quality of those PHP apps. In my opinion, though, you can't argue with their success. PHP delivers what users need, and in the end that's all that matters.