Software written by consultants is terrible for the same reason work-to-rule is an effective protest.
[b]A form of union protest is to work-to-rule: to do precisely what the formal rules require, but not the informal norms.
Real situated work requires fractal decisions that require you to care about the outcome.
Software built by consultants will implement precisely what you told them to.
Specifying what you want in formal detail is impossible in the limit.
It would take infinite time to specify all of the fractal details.
At some point you get to small enough details that you just assume the implementor will make reasonable calls and you can stop specifying.
That works when you have a dealt-in implementor; someone who feels ownership of the result and is incentivized to make micro-decisions that align with the goal.
When you're building your own thing, you don't have to specify those micro-decisions; they just naturally resolve correctly.
When you're explaining to someone who is possibly incompetent or misaligned, you need to write down the details, composing an infinite branching structure into a stream of text.
This applies to coding agents, too!