Devs always have a choice, but almost always choose to make more money. Nobody is putting a gun to anyone's head forcing them to develop for macOS.

The other mainstream platform is Windows. Apple only needs to beat Microsoft.

And many do abandon Apple.