The world is filled with things that have many different variations: word processors, cars, home designs, beverages, candy, pens, shovels, etc. The reasons why we have so many can be boiled down to a few principles:
- Someone thinks they can improve on existing products
- A different design is necessitated by local considerations (think: homes on stilts vs. homes on concrete slabs)
- A new category of product fills a need where none existed before
Walk into any office supply store and look at the "writing instrument" section -- there are hundreds of varieties of pens. They all do roughly the same thing: deliver ink to a writing surface. But each pen you see displayed for sale is there because one of the three reasons above.
- Cartridge fountain pens are an improvement on dipped fountain pens,
which are themselves an improvement on feather quills.
- NASA needed a
pen that could write in the absence of gravity, so the pressurized
rollerball pen was invented.
- The very first pen itself may well have
been a pointed stick dipped in tar or blood; prior to that people
were scraping rocks together or smearing pigments on walls with fur.
(Just a guess.)
The evolution of pens will continue since no one product fits the needs of every user. Some pens are cheap and disposable, some are expensive and built of high-quality materials; some use gels, some use ink, some use pigments; some have twist-off caps, some don't have caps at all; wide barrels, narrow barrels, round barrels, square barrels; short, long; red, white, black, blue. Etc, etc.
But enough about pens.
Our current myriad of programming languages can be traced back to the very first ones: the numeric machine codes for early computers back in the 1940s. Primitive, hard to use, and laborious to enter into the computer, but they did the job. It wasn't long after that programmers assigned mnemonic words (such as ADD, CALL, LOAD) to the machine codes, giving birth to the class of languages called "assembly languages."
Different processor architectures called for different mnemonic codes, depending on the specific features of the underlying machines. Taking these differences into account meant inventing different assembly languages.
(Perhaps by now you can see where this is going...)
Programmers looked at their assembly languages programs and saw patterns: the same sequences of instructions would be used to form loops, conditionals, variable assignment, function calls, and so forth. Thus, the procedural programming languages were born. These languages encapsulated groups of instructions under umbrella terms such as "if", "while", "let", etc.
Out of a mathematical analysis of computer programming came the functional languages -- a whole new way of looking at computation. Not better, not worse, just different.
And then there's object-oriented, statically typed, dynamically typed, late binding, early binding, low memory usage, high memory usage, parallelizable, languages for specific uses, and on and on.
Ultimately, we have different programming languages because we want different programming languages. Every language designer has their own ideas about how their "dream" language will look and operate. Diversity is a good thing.