Because they heard from other people it sucks...
PHP does have it's issues yes, I'm not really the best person to answer but it's easy to write horrendous code as it lets you "get away" with it, whereas other languages kinda enforce you to write code "properly".
It's come on in leaps and bounds though in the last few years, namely due to tools like Composer, and frameworks such as Symfony.
Haters are gunna hate unfortunately.