I think its because influential companies in the tech space pushed them. For instance, Go is backed by Google, and they made alot of rounds evangelizing Go.
Kotlin is a Jetbrains project and it certainly didn't hurt that Google made Kotlin the preferred language over Java for development on Android, and that Kotlin itself has great Java ecosystem compatibility.
For years, Rust was Mozilla's baby, and they did a lot of good work evangelizing Rust for its use case, and other companies adopted it as well, continuing the cycle.
There is nothing I can think of that is comparable for F#, OCaml, Haskell and many other fine languages
The corporate backing is a good working hypothesis for C, C++, Java, C#, Go, Kotlin, Swift, Dart, JavaScript, TypeScript and Rust. But it doesn't explain how PHP, Python and Ruby became mainstream. Maybe those ones are just outliers, products of a very special period of time when "dynamic" programming languages were popular (and it's easier for a small team to develop such a language) and when the web was growing very fast (and many devs were bored with the "ceremony" of "static" programming languages like Java).
They were first round languages. When Python came out, it was largely a C / C++ driven world (Python predates Java by 3 years). It's original use case was around scripting C / C++ programs. If I recall correctly one of the biggest use cases for Python early on was doing test harnesses for C++ codebases in particular. Python's ability to basically be "wrapper for C / C++ libraries" is still its main strength, though clearly the language evolved since this time period. Pascal was a big player too back then, and has fallen quite substantially from developer mind-share. (in the 1980s, predating this era, there was a lot of work and energy around Objective Pascal and getting that on every platform they could. It almost worked. This is what Embarcadero[0] is all about via Delphi[1])
PHP was "easier" Perl. Perl was also ubiquitous at one time because of CGI and the web. PHP was one of the first languages to have the same ease of deployment story as Perl but a much easier syntax to deal with. Again, language space wasn't as crowded then. Certainly both were easier to use than C / C++.
It was easier to gain a foothold in the first round (web 1.0 era if you will) of software and development. There was simply less competition. Java didn't even come out till 1996.
The second era of languages, I think really starting with Go and continuing through to Rust, they faced a bigger uphill battle. There simply isn't the mindshare to capture as easily as there was back then.
Admittedly, I'm still not sure to this day why Ruby took off, other than it offered a great developer first experience as a language, from what I understand. It seems people who use Ruby tend to really like it. It seems it has a stickiness there that other languages don't, maybe? I've always been confused by this one, and I admit that's due to personal bias of not enjoying its syntax at all, however there are clearly lots of people who do. I just prefer one true way of doing things.
i think ruby took off because it was a better perl at a time people were really wanting one. python didn't really fill that gap because it did not embrace perl's shell scripting and quick text processing aspects, whereas ruby did, as well as providing a much cleaner and more consistent language. also the developer experience really is wonderful.
PHP I feel like was mostly all the old web providers you could sign up for to run your own site always had LAMP stacks available as options either default installed or trivially installable, often with instructions.
Ruby I'm not sure what caused the hype unless it was something like Heroku making deployable Rails easy.
Didn't python become mainstream until numpy/pandas? In my mind, data science was Python's killer app, but maybe that's just my revisionist brain. Similarly, I think Ruby had Rails as its vehicle.
Rust also brought something completely novel to the mainstream, so I wouldn’t put them next to Go and Kotlin, which are at most different combinations of existing features.
Kotlin is a Jetbrains project and it certainly didn't hurt that Google made Kotlin the preferred language over Java for development on Android, and that Kotlin itself has great Java ecosystem compatibility.
For years, Rust was Mozilla's baby, and they did a lot of good work evangelizing Rust for its use case, and other companies adopted it as well, continuing the cycle.
There is nothing I can think of that is comparable for F#, OCaml, Haskell and many other fine languages