It’s because PHP’s popularity is old and Postgres used to be mid. MySQL was faster and better than Postgres.
But Postgres slowly improved and then got better than MySQL while MySQL stagnated. The most basic bugs persisted, basic features never got added and consistency never seemed to be a point of improvement.