Yes but Microsoft doesn't let you build on macOS either.
With mac, you still have an option of installing windows.
I am not saying one is better than the other, but as a developer, I feel macOS gives me best bang for the buck.
Microsoft does have control over building a version of Visual Studio that runs on macOS if they really don't discriminate based on the platform. They want their phone apps built on windows and I think it is fair, but they aren't that much different from Apple.