Carl Sagan said this quote

Evolution is adventitious and not foresighted. Only through the deaths of an immense number of slightly maladapted organisms are we, brains and all, here today.