Momentum is one reason. As others have mentioned Python is widely used by mathematicians, scientists, and data scientists. Many of the popular libraries for data science and ML, like Pandas, Juptyer Notebooks, Keras, TensorFlow, are written in Python.
JavaScript is not as well suited for ML work. Its math libraries are not as mature. It does not have native support for large numbers. And while Node has great performance for IO intensive tasks, its performance is much weaker for CPU intensive tasks.
However... this may not be the case for long. Native support for big integers is a proposal in TC39. Google announced this year a JavaScript library for TensorFlow that runs in browser and utilizes WebGL for hardware acceleration. ML in the browser has some very compelling advantages over ML in Python. They have also announced that they will soon release C bindings for Node that will enable ML tasks written in JavaScript to run directly on a GPU or TPU. Support for JavaScript in Juptyer Notebooks has also been advancing. It may not be long before JavaScript is as ubiquitous in ML as Python.