Lua is a great language, but JavaScript has become something of a "lingua franca" for web development. ArangoDB's API is based on HTTP and JSON, so JavaScript was an obvious choice.
Lua is a nicer language, but the sheer number of developers who are familiar with JavaScript gives it a huge edge. I suspect that's the driving reason.
On the other hand, Lua is much easier to embed into programs. And it is used a lot in games. If I remember correctly, Redis is also using Lua for scripting.
From what I've heard the author of LuaJIT contributed a lot of performance improvements to V8.
LuaJIT is a blessing and a curse. It's magnitudes faster than the standard interpreter but on the other hand it's version is lagging behind which means a lot of people won't benefit from the latest lua version
And the constant performance improvements over the last years, that are the result of the ongoing race for better performance between the browser vendors.
Javascript is the only language native to the browser.