But PHP was essentially the original widely adopted lambda cloud function. 1,000s of dirt cheap shared hosting platforms showed up on the scene. The reason they could make the hosting so cheap was that the way PHP runs. You are only consuming resources when you are serving the request.
To this day, cloud functions still deal with "cold starts", where this was already a solved problem with PHP shared hosting.
All PHP needed to be was good enough. It was how it served pages that made it as popular as it was.
Large disclaimer, I know a PHP shared host was not actually scalable like AWS Lambda. Just the idea that any small business could plop down a few servers and start selling shared PHP hosting was huge back then.