was mindless, chaotic chance.
Where did you get that idea. Evolution is “whatever works” natural selection with a little bit of usually harmless drift. Mutations are random but whether or not they persist in the species is anything but random.
I refer principally to the oft-employed device of personification by writers of pop-science, whether for periodicals, or television.