Not to be rude, but scientific/ai/data scientists are typically not the best "programmers" (best practices and code hygiene) , and their stuff is the main reason to be on Python these days (other than for small CLI and scripts), which pulls everything around into it like a black hole ("oh let's make the api in Python too, to keep it one language").
And Python has a ton of newbies, college kids etc. Though this is also true of JavaScript.
As an industrial language/environment with best practices for very large codebases, it's really weak and I much prefer TypeScript despite the occasional tooling fatigue (has slowed down).
But a ton of money has been poured into JavaScript (v8) which really set that into motion.