The OS licensing is friendly to running VMs as long as the underlying hardware is Mac hardware.
Building datacenters that run Linux is easier and cheaper, but Apple is a hardware company, they want to sell you hardware, so there's not much incentive for them to allow people to virtualize macOS on non-Mac hardware.