maybe we should just conclude that quick to learn languages will always get popular even if they are nowhere perfect.
JS is not perfect but its easy and available, same for PHP, basics can be learned in a day and you can have a working webapp in a week (especially with a framework like Laravel), on the other hand I wouldn't program a missile guidance system in it.