If you want to run the same code on the browser as on the client (for example in a scheme where you want to reduce latency by optimistically running server-code on the browser), it is nice to have Javascript on the server.
But you could also achieve this by transpiling another language to Javascript of course.
But you could also achieve this by transpiling another language to Javascript of course.