IMO slop usually comes from overly defensive programming from LLMs. They’re loath to remove code and simplify, because unless we humans tell them some code / use case is unimportant, they have no reason to not care about it.
So agents can make these overly complex solutions trying to make bulletproof implementations and prevent regressions.
It requires a human to look at code, ask about complexity, and guide simplification by subtracting requirements implicit in the code.