I think some of it is because it was a very purpose-driven language more or less created on the fly, in order to provide a convenient way to create interactive web sites. As such, it was not designed with any particular underlying concepts other than "make it work". It therefore has evolved to have inconsistent syntax/naming, a lack of (practical) multi-threading, loosey-goosey typing, and other things "serious" software engineers look down upon.
It's still a very usable language for interactive web sites, though it's also very easy to write really crappy code that basically "works". 🙂 It's not so hot for things like complex, high-volume data analysis and/or machine learning tasks, which Python is probably the most popular option right now.