The only way to create an app is to buy Xcode/Swift - and I can't even imagine how many man-years of labor are involved in creating, maintaining, and updating these tools. I used Metrowerks CodeWarrior C++ in the 1990's, and it cost about $400 to have access to that software to create apps for Mac at that time. Now those tools are free.
Most developer tools available today are free, with the exception of those that are built to support professional enterprise software development organizations (ie, Visual Studio Pro or Enterprise). VS Code, VS CE, Eclipse, Komodo IDE, GCC, Watcom... the list goes on... are all free.
This isn't the 1990's anymore. IBM isn't selling the OS/2 SDK for $2000 per license in 2022. Johnny Pascal isn't having to shell out hundreds of dollars to Borland just to do some hobby programming in his spare time. High school teachers no longer have to use their personal funds to buy a license for HyperCard just to show their students how easy visual coding is.
It is silly to compare the price for developing for Apple today vs. 30 years ago. You compare the price to develop for Apple vs. the price to develop for their competitors. Of all the
modern companies who write development tools, Apple is the one with the
least excuse to be charging a hefty amount for theirs - they recoup the cost of building and maintaining Xcode a hundred times over just in developer membership fees.
Suppose you created a new iPhone game or to-do list app. Would you seriously attempt to advertise it via Facebook, Google, or print magazines? Perhaps spend millions of dollars? But you can just put it on the App Store and people search for To-Do Apps, and yours pops up, and they buy it. No up front cost to you at all.
Dude, you just said you used to code with Codewarrior back in the day. You of all people should know that independent software developers existed and thrived long before Apple invented their marketplace. The only reason why the App store is the only feasible solution for developers
now, is because there is no competing choice.