For performance in super specific situations where you can use it like a jit of sorts to reduce overhead.
To intentionally obfuscate code or avoid shipping core logic to clients for fear it will be copied.
Any other use is probably just inexperienced programmers trying to find a way to write higher level code and failing.
I see it as a bit like LLVM - an intermediate stage that adds flexibility.
Generating from nice models and nice templates (the real source code) verbose and correct "boilerplate" that won't be usually read, let alone modified, is simply a shift to an ad hoc, specialized programming language.
Who says you have to check the generated code in and modify it going forward?
You're commenting on your own definition of 'code generator' without properly considering this tool and its use cases.