Programming languages are created to solve problems. Every now and then, a programmer encounters a problem and they decide that solving it with the existing languages is not good enough.
So they write a new programming language.
Larry Wall wrote Perl because he was fascinated with linguistics and designed Perl with that in mind.
Guido wrote Python because there were no languages at the time with simple syntax, something similar to pseudocode.
Bjarne Stroustrup wrote C++ as the OOP language version of C.
Google created Golang because the language landscape was not sufficient enough for their needs.
Graydon created Rust due to the common issue of memory leaks occuring in C languages. Rust solves this problem effectively while maintaining its speed.
How do you decide which language to use?
Usually depending on the task. There is almost always a trade-off as to which language you choose.
Python is easier to code with than Rust but Rust is faster.
Some languages are naturally dying out and that makes our decision easier.
As hardware improves and new use cases and challenges emerge, the landscape will keep updating itself.
A good rule of thumb for developers is to not get too attached to any language!