Very complex structures can be generated by interactions between simple elements without a plan or an intention. This can be shown by computer simulation. However, that alone does not explain why the simple elements had the ability to combine in the proper environment. When computer simulations are performed to study the spontaneous emergence of complex structures, the elements are endowed with rules and these rules were defined by a mind in the first place.
I think the beauty of G-d’s creation is that He planned the possibility of everything while leaving room for a large degree of unpredictability in the actual realizations.
Also, I believe that these countless worlds with no presence of life are there to show us what a miracle it is to have life and intelligence on Earth. Only G-d creates miracles. If our existence was due to a random combination of factors, there would be different forms of life and intelligence in many other parts of the universe. There is strong mathematical evidence for that : it could be proven that the probability that the precise conditions for human life to emerge and grow be randomly generated, or generated out of chaos, is zero.