Thread:Extension talk:Scribunto/Why Lua?/reply (2)

Convenience of embedding is a major factor, in particular that Lua is easy to sandbox and to add memory and CPU-time limits to. File:Wikimedia Hackathon 2013 - Scribunto presentation slides.pdf has some slides addressing the issue.

As for a compiled language, Lua does have a compiler. But dealing with a compiled binary (whether Lua or something else) might turn out to be slower for common cases than running the Lua interpreter in-process with the luasandbox PHP extension due to the need for IPC and more context switching, and might have linked-library versioning issues in heterogeneous environments.