They are however widely known to be terrible at code
They are for large tasks. However, for simple pattern repetition tasks, they're generally fine, code or not. I've had success, for example, having them remove pointless, confusing try..except blocks surrounding imports at work. I usually find that I just rewrite anything myself if it's anything more complex than that because the code it produces makes no sense and taught me nothing.
I like to say the main problems with most projects were already the code quality and the bugs, and not that we somehow needed even more low quality lines of code.