If you're looking at all of the code that evolution has ever written, then yes, I suppose you could say that most of it is very poor. The fraction of code that survives and propagates, however, is awe-inspiringly beautiful.
If you're looking for some insight into what makes it so beautiful, The Selfish Gene is an excellent place to start.