Yes, I never totally understood why the PHP execution model wasn't copied by frameworks in other dynamic languages like Ruby and Python.
PHP is hard to beat for development velocity. Edit a file, refresh a page in your browser, see the results.
You could always write CGI scripts in Ruby and Python, but other than catering to the PHP-infected, why would you want to?
Ish. I remember when the earliest versions of Rails used a CGI runner. Development didn't carry on long before application startup time became so horrendously slow that it was no longer viable. That is when it started to become popular to add a server in the application.
Now that people are back to writing their applications in languages that aren't as slow as Ruby they've, in many cases, taken the server back out of their application and have returned to the CGI model again; what is often marketed as "serverless".