It's very difficult to write an OS that runs on the bare metal of an arbitrary computer. One advantage of virtualization is that hardware differences are normalized, and you only have to write a few drivers.
If I was to write an OS for fun I would probably target something with fixed hardware like the RPi.