Automated code should be beautiful too. How can you debug what you generate if is so ugly? I would even say there is less of an excuse since 100% was written by you and you can easily rewrite all of it at once.
2) It isn't that ugly! If you know what the code is supposed to do (which should be clear from documentation or just the purpose of the program) and it fails in some cases, take that failing case and go through the if-else statements manually.
If this is machine-generated code the real program is the one outputting this script. The big machine-generated statements are just data from that program. That program may be much better structured.