If we consider the language C. It directly compiles the code in the processor instructions. So, it doesn't matter on which processor the program is executed. But if we consider assembly language, it's specific to the processor it is being executed on. So, according to this if we make a program in C, & make it a bootable. There should be no problem of the processor being used, & the program should run right away, And it also does run without any issues. Then why is it so, Microsoft Windows requires drivers to use a CPU ( You can check it device manager, where driver for the CPU being used is installed ). If a simple bootable program , can be written, compiled, & executed, without requiring a driver. Then why is CPU driver installed in windows ?
You might be able to do that, but only if your program doesn't do any I/O, i.e. not writting to the screen, no accessing the disk, etc.
To make a C program that actually does something it needs to perform some I/O (at least to send "Hello world" to a screen, or to a LED matrix, or to a serial port). I/O management can be either included in your program, as it's common with embedded devices, or available to it in form of shared libraries that your program loads and calls, managed by the OS.
That said, it's true that you can make, compile and run a simple program as boot program in many environments, provided that all the I/O routines it would need are included in the executable, and there's a tool chain that takes your C program and gives you a boot image executable for your desired platform.
On the other hand, Windows doesn't have a device driver in order for you to use the CPU. The device driver you have seen by the name "CPU" is for managing things like the IO APIC, to route interrupts; the Local APIC, to enable multicore processing, several features like virtualization, NX bit, etc. You see... it happens that the CPU has a few I/O devices inside it, so this device driver is for managing them.