Keep in mind that software engineering as a field is like, incredibly new, compared to a lot of other fields. Computers have not been around for that long, historically speaking.
It's honestly to be expected that some of the first established languages did not turn out to be the best language that could be. We're still figuring out how programming languages should be.
In 50 years, there will probably be another series of programming languages. They might even be optimised for LLM usage rather than for human directly, who knows. This stuff is all so new.
Scenarios in gambling are rarely "purely random". I.e. the likelyhood of winning in poker depends on what you already got dealt and what other cards got dealt and so on. What does "purely random" even mean? Like a lottery with equal chance of winning for all participants? Yea that's gambling but just one kind of gambling.