All processors run on bits, we call this machine code, and it can take on a variety of tastes for a variety of reasons, creating the best mouse trap for patent protection. Each processor uses some taste of machine code from the point of view of users, and some internally convert it to microcode, other machine code, and others. When you hear x86 against arm vs mips vs power pc, these are not just company names, but also have their own instruction sets, machine code for the respective processors. The x86 instruction sets, although evolving, still resemble their history, and you can easily select x86 code from others. And this is true for all companies, you can see mips legacy in mips and arm a arm, etc.
So, to run the program on the processor at some point, it must be converted to machine code for that processor, and then the processor can process it. Different languages and tools do this in different ways. The compiler does not require compilation from a high-level language to assembly language, but it is convenient. Firstly, in any case, you will need assembler for this processor, so there is a tool. Secondly, it’s much easier to debug the compiler by looking at the human assembly language rather than the bits and bytes of machine code. Some compilers, such as JAVA, python, old pascal compilers have universal machine code (each language has its own), universal in the sense that java on x86 and java on the hand does the same with this point, then it is the target (x86 , arm, mips) by an interpreter that decodes a universal bytecode and executes it on a native processor. But ultimately it should be the machine code for the processor on which it runs.
There is also a history with this method of these compilation layers, I would say that this is a somewhat unified approach to the building block, make one block the front end and the other block the backend and output asm, and then asm to object is its own tool, and the object associated with others, it’s its own tool. Each block can be maintained and developed with controlled inputs and outputs and can sometimes be replaced by another block, which is located in one place. Compiler classes teach this model so you can see that they are replicating with new compilers and new languages. analyze the front, high-level language text. Into the intermediate, compiler-specific binary code, then it takes this internal code to the backend and turns it into an assembly for the target processor, allowing, for example, with gcc and many others to change this backend so that the front and middle can be reused for different purposes. Then Separately, there is an assembler, as well as a separate linker, separate tools by themselves.
People keep trying to reinvent the keyboard and mouse, but people are comfortable enough with the old way they stick, even if the new invention is much better. The same is true for compilers and operating systems, and so many other things, we go with what we know, and with the compilers that they often compile for assembly.