You can put it on the Mac app store and pay Apple’s tax (and live at the mercy of Apple, who are a terrible business partner)
Or you can sell it through your website and not pay Apple’s tax. Except if you do this, Apple will tell your customers that you’re potentially a virus, and you have to invest more on customer support and education materials just to teach people how to launch your app (through no fault of your own). In some cases, it’s just not feasible to do this, and you just have to accept reduced sales and/or increased returns/chargebacks from angry customers that blame you for Apple’s decision.
Apple’s Mac app store has a huge competitive advantage thanks to this unfair practice. Your competitors will beat you if they put their app on the Mac app store, no matter how much money you invest into advertising and improving your product.
That’s anti-competitive behavior from a monopolist. It’s the same situation on Android (it’s actually worse on Android, as Google is the pioneer in this field)
It goes a little deeper than that. I'm not talking about running stuff somebody else built, I'm talking about using my own machine for my own purposes (i.e. writing a program for myself) which Apple have decided to make increasingly difficult. Examples:
Being forced to use XCode to sign .NET assemblies before they will run. You can build and run a self contained .NET program on literally anything from a Pi to a multi-processor rack server running Windows or Linux and it just works. Not on a Mac though, gotta jump through Apple hoops before that happens.
Apple deciding that your new iPhone isn't allowed to talk to your old Mac.
Being forced to use a Mac to do iPhone development, despite XCode being the runt of the litter of development environments.
Weird, old, crippled BSD for an operating system? Why not! Having to install a package manager as a seperate thing just to install boring stuff that comes with most Linux distributions. Why don't apple install Homebrew by default? Why do they pour so many resources into making the UI shiny instead of producing a modern OS?
Is your company using Docker for deployment? Why not give you a Mac which has the worst Docker development experience of any of the major OSs. What a wonderful idea.
Have you tried getting a command-line program to build and run on an M1 Mac lately?
Yeah, it works most of the time. But when it doesn’t, e.g. due to some post-build script that massages the binary after signing it, it brings you a world of pain.
And to do that, as a package maintainer, you sometimes have to trace upstream’s build system because you need to intercept the file after the build system has patched it, but before they’re actually using it to run the tests. And then you try to inject the codesign command line into the upstream build system, and hope it’s going to work this time.
And often enough, it just doesn’t work at all ([1] ballpark number of issues, [2] one example case where I can confirm that I was affected myself).
Right click on app, select ‘open’. If you get a prompt warning about an unknown developer, pick the option to run the app anyway.
Getting angry about a prompt that you only ever see once (it won’t prompt you again) seems extreme.