If assembly language is only a readable way to represent machine code, then why are HLLs converted to assembly first and then to machine code?
Shouldn’t HLLs be directly converted to machine code?
This is customary practice on Unix systems because it simplifies the compilers. Compiling is largely not dependent on the gritty details of machine code, and many compilers can all target the same assembler.
Some compilers target an intermediate abstract machine (like JVM) or even an intermediate concrete machine (MIPS) which is not the actual hardware the code will everntually run on.
Some compilers do go directly to machine code. It’s not very portable and portability is a big thing now (it didn’t used to be back in the stone age of computing.)
7