Evolution may write poor code, but it can accomplish some really cool stuff with it. The human brain, for example. If a programmer had managed to recreate the human brain in code, even if he did it in spaghetti-coded COBOL, people would want to have a look.
Also, evolution isn't always elegant, but it often is. Think of the symmetry and self-similarity found so often in nature.