Processor instruction sets are fundamentally imperative, but programming languages can be declarative. Running a program written in a declarative language inevitably requires some type of code generation. As mentioned in this answer and others, a major reason for generating source code in a human-readable language is to take advantage of the sophisticated optimizations performed by compilers.