Everybody is different. I'm a very long-term C programmer.
Learnt Smalltalk because I wanted to better understand OOP and I could never get comfortable with C++.
Learnt Python because it provided me with a more interactive environment. Over time as more modules were added it became increasingly my choice for exploring interfaces, e.g. poorly documented USB devices.
Learnt JavaScript because I saw it as becoming increasingly pervasive. The growth of Web APIs together with the browser's graphical environment is edging out Python for many projects.
I struggled with C++ after coming from C.
Then I read Alan Kay: "When I invented OOP I didn't mean C++". So I explored Smalltalk, loved the environment, hated that deploying apps is a pain.
Tried Go, because Google ...
Now mostly JS because it's everywhere and Python for the batteries.
This competes with learning to do some new kind of programming in the languages you already know. If you program in Java or Javascript or Python or Rust or any other general purpose commercially viable language go write compilers or chess playing programs or something. That might try to lead you to try another programming language!
Library quality can be a deciding factor, at least for me.
you invest the time where you think that language will be your preferred choice for a specific task
i learned golang when i realized it worked fine for scripting and it fully replaced anything i might have kept using perl5 for.
i looked at rust, realized it would only replace C for me in certain cases, and is still comparatively volatile to work with, not a good use of my time.
Haskell, hare, forth, etc, all tiny communities; investing in a tiny community does not, per se, make sense.
Erlang is intriguing because Ericsson.
Wasm would complement my JS knowledge.
Runtime & tooling is important; if either of those is sketchy, if provided tools do not play well with commonly used development tools, that’s a huge problem.
I’ve done industrial automation for work (Rockwell,AB) and like the work, per se, but would never invest personal time into it because the relevant tooling is all proprietary and absolutely atrocious (And eye-wateringly expensive).
Tooling is important. How hard is it to install, set up a project, and get working something more complex than "hello world"?
Are there good libraries, either inherent to the language or in quality libraries, for something I'm interested and competent with. It's hard to both learn a new language and a new programming domain. For example, I know very little about circuit design and have little interest in it, so I'm not going to learn Verilog.
If there aren't good libraries, is there at least enough capability that I could reasonably build my own library in an area I can apply my expertise?
if python == language:
print("excellent choice.")
else:
print("need to fix language")