Hi Leiz,
Redis is "stuck" with Lua 5.1 because later versions are not backward-compatible. Had the project upgraded to 5.4, deployments would have broken all around the world.
Until v7, the Lua engine was 1) single and 2) embedded. Part of the work done on Redis Functions in Redis 7 was to support multiple execution engines. It could be that in the (near) future a Lua 5.4 would be included as an alternative.
That said, the real question is why would one prefer 5.4 over 5.1, so any input you can provide on this is helpful :)
Cheers,
Itamar
P.S. you can search the repo for PRs/issues with Lua to get more context on the matter.