I think the main goal of Xcode Cloud is to offer a first-party, out of the box solution for CI/CD. You'd be surprised how crappy (and expensive) GitHub's experience is when it comes to iOS and macOS builds.
macOS virtualization is pricey by Apple's design. This is not just a GH problem
macOS hardware or virtualization is beaucoup bucks in every cloud. As I said, this is not just a GitHub (or Microsoft) problem.
That's just not an option for mac or iOS in the same way it is for Windows.