Humans have been writing unmaintainable code well before LLMs came along.
But LLMs can do it much faster and more consistently.
They had good teachers. :-)