but to make a binary for it? You do. Even if it's not-for-profit. Why do you think web interfaces are so popular for OSS, a lot easier for the code to be JIT'd and run in a browser than pay a $99 vig for something you did in 10 days to speed up a process for yourself etc.
You're sort-of right, I think, because you do need an Apple account to sign in to the Mac App Store to get current Xcode in the first place - but the $99 is entirely optional!
For distributing your program without the fee, you'll probably moan about the hoops that people have to jump through to run your stuff: https://support.apple.com/en-gb/guide/mac-help/mh40616/mac - and I can't say I love this myself, but people can run your stuff, and no fee necessary.
(I've got a couple of (somewhat niche) FOSS things for macOS, and I build the releases using GitHub Actions with whatever default stuff the thing uses, then make up DMGs that people can download from the GitHub releases page. I added a bit in the documentation about visiting the security dialog if you're blocked - and that seems to have been sufficient.)
I compile and run utilities on my Mac all the time, and I've never spent a penny on dev tools or unlocks.
Yes, there's a fee to get access to the App Store, but almost nobody on the Mac uses the App Store... the fee is mainly for putting stuff on iOS (and likely watchOS, tvOS).
The fee also gets you the absolute latest Xcode, but go back one version, and it's entirely free.
On Mac, you can install brew, and use it to install gcc, clang, qemu, whatever utilities you want.
You used to need the developer fee to put stuff on your iOS device at all, but these days you can put stuff on your personal devices without a fee, but the binary expires in a week... enough to learn and debug, but not ideal for a personal tool. That's about the only annoyance where the fee comes up... long term deployment to iOS.