Because it's what the person writing it's preferred language.
So it can share code with the web app.
Because writing it in javascript is easier than writing it in raw brute forced assembly.