Apple has a self host cloud division as well as AWS according to news reports. Unclear if they run on Linux but it seems likely they must, even a bit if using AWS. Theoretically they could probably upload custom AMIs with macOS.
They're Apple after all, so they can build macOS to boot from a standard environment - UEFI, kernel that doesn't check the copy prevention string on SMBIOS, etc.
Us, mere mortals, are more restricted, as we don't have the keys of the kingdom.