A useful analogy is natural selection. The two features, mutation and selection pressure, are present in software. From the inside, the mutations seem rational, controlled, planned, but from the outside they are random. The selection pressure is itself complex, but success can be measured by "number of copies in the world", which is ultimately driven by social success and luck as much as anything. Software also has a (unique?) "win more" mechanic where a popular tool tends to get more popular. The pressure happens recursively at different scales, and sometimes very large branches tend to die off because of big topics like "lack memory safety" or "supply chain attacks".<p>Interestingly, language diversity seems driven by school curricula, which becomes comfort which becomes hiring practice, the change driven by academic boredom with a given language.