Code generation also allows for an automatic feedback loop that isn’t really possible for natural language generation, either ...
Programming languages constantly change, and developers need to stay current with what's working in the real world.