For the rest of us, for the low low price of $100 to join the developer program plus $1000 for a Mac, we can get the ability to install software that we can build, which more-or-less precludes sideloading as an option for commercial software.
So, for all practical purposes, yes, Apple does dictate what you can install on their phone. The question is really whether you think that that's a feature or a misfeature.
These are vastly different things. You own your phone and you can do whatever you want with it. It's just that you can't use Apple's distribution channels to spread you code.
Theoretically you could bypass everything by replacing the OS, except that you can't replace the OS without yet another key that Apple isn't sharing with anyone.
People who develop apps do it everyday many times because they need to run their code on devices. You don't ask apple for permission every time you press the build button.
That does mean Apple has a nonzero amount of control over that channel, too.
Do you want to make holes? Then you buy a drill.
I'm not hating on them. I'm just advocating a realistic perspective on the situation. iOS is a walled garden. That some people (myself included) see that as a net positive doesn't make it not one.
That other person gives you the sourcecode, you compile it an install it on your device.
Oh BTW, you don't have to pay for dev account anymore if you don't intend to distribute your app.
There you have it. They can make the stuff opensource, put it on GitHub and let people install themeslves.
This is Apple controlling the distribution, it's not about controlling what's installed on the devices.
People can install the spyware freely.
That's the unfortunate status quo. But it would absolutely be possible to legislate Apple (and Google Play Services - grey area) to allow 3rd party stores/apps.
Apple doesn't dictate what you can install on your phone, you can install whatever you want using the developer tools.
What Apple dictates is what people can distribute on their App Store.