People typically write small, short scripts in bash, not web applications. The same goes for JavaScript, but in reverse. They were designed for different things.
You should really think about why javascript is the de facto standard for web scripting. Other alternatives have appeared but even the likes of Google, which control the entire web stack and can pretty much dictate what the world uses, decided against it.