Because a novel is about creative output, and engineering is about understanding a lot of rules and requirements and then writing logic to satisfy that. The latter has a much more explicitly defined output.
We’re moving into a world where suboptimal code doesn’t matter that much because it’s so cheap to produce.