while i agree with your sentiment, i think Apple would probably argue that they're actually charging for access to their distribution network.
I maintain an open source macOS software and begrudgingly signed up for a developer account since I didn't want my users to have to suffer through the security settings screen. At least I got a donation program up a few years later so at least I'm not paying out of pocket anymore. Some of my peers/competitors (open source text editors) are still not signing their app (since they didn't feel like getting this sorted out) forcing users to have to go through the security settings which I think is a crappy situation.