Isn't writing in one language and compiling it into another language just adding lots of complexity?
Most programming languages compile into another language and compilers have been around since the first programming languages. Those compilers typically generate a language that is only meant for the computer to read, not the developer.
Scripting languages can be different in that they run without compilation, simply interpreting the script code you have written.
However, its a fairly recent trend (for the last two decades) to use one language to generate another, often referred to as transpiling.
Hint Rather than call this compilation, generating one language from another is called Transpiling.