You're right that the back-end often gets ported to some other language when a PHP app is scaled-up; this goes with my point that when you move away from spitting out web pages, another language is a better choice.
I'm not sure your point about a database is valid; Python and Ruby and Perl apps are all using a shared database (or newer k-v store) as well.
My point is that it's the place where all shared state is kept. "Shared nothing" is a lie because it's sweeping the sharing under the rug of the database.
I agree that most web stuff written in scripting languages is built around a database for shared state. But in more powerful languages, you have other options.
I'm not sure your point about a database is valid; Python and Ruby and Perl apps are all using a shared database (or newer k-v store) as well.