For the same reason people don't write everything in Javascript. It is not the global optimum language any more than any other language is, and there are tasks where it is easier in programmer terms to write in another language that can have stronger guarantees or a better DSL for some task or whatever than Javascript. As more and more stuff moves to the client an expanding range of client tasks falls under this category.