Who said they can do what ever? No one stated that Apple can do what ever.
It is factually their platform whether you like it or not. They designed it, built it, invested billions into it. It has always been a closed platform. Don't like it don't buy their products.
How much have the law makers invested??
How much R&D came out of their pocket??
Just because law makers can change laws does not mean those laws are just or right.
Law makers are politicians right next to or just below thieves on the morality list.
I feel like this fits almost right alongside arguments against right to repair. It's their device. They invested billions into. They created the parts. Took the risk. Only apple should be allowed to repair your device.
It may not make sense now, and you may rebuke and say right to repair is totally different - but it's really not. Being against right to repair is stating the people who make the device are allowed to decide how you not only use said device, but how you can fix it if it's broken. A walled garden on a device, means the maker of said device controls every aspect of how you are able to legally use said device. There are no exceptions. They funnel and police everything. It's equally not really "right". Not even morally. You brought up morality of law makers - when morality in general for walled gardens is nothing but favoring a multibillion dollar company.
Creation of a device does not mean you fundamentally control how the end user gets to use said device. Imagine you bought a PC and Microsoft told you guess what, you can only get applications, games, everything from OUR store. Steam? Blocked. Other internet downloads? Blocked. After all, Microsoft invested BILLIONS of dollars into their operating system. They are taking all the risk with Windows 11. They should control how and where you get every piece of software on your computer. Don't like it? That's fine, go use linux or go buy a mac.
Except, for obvious app compatibility, that might not be true. Oh but Microsoft doesn't MAKE the hardware! So that makes it better? Now, the argument against this is well "windows has never been that way". You're right. It hasn't. Because walling off all competition is fundamentally illegal and Microsoft lost a massive lawsuit decades ago over trying to have a monopoly in the pc space.
The argument then goes "well, apple doesn't have a monopoly. Go buy a android". You're right, Appel and Google combined, own basically the entire phone market. So it's two companies, instead of one. Technically competition, and technically Google owns 85% of the world wide market. Still, it's such a massive market 15% is still a lot. And for PC - it's 3 companies.
Point is, Apple could not get away with walling off their entire Mac OS from you installing applications outside of their store. It's already been ruled in court to be illegal. Why should their phones and tablets be any different? Why can't I legally install applications on my device without hacking it outside of the app store? Why can't I decide to spend money through my phone that ISN'T FUNNELLED through the people who made the phone? Literally every purchase you make, even on amazon, is ran through apple. Who takes a cut. Why are we just okay with this?
Look, I am not going to make Epic out to be some sort of hero. Their entire lawsuit was also completely greed based. But apples rules literally blocked xcloud because it can be used with pre-existing subs off their platforms. Do you not see the problem with this?
It's one thing if Apple needed to do that because they are taking a loss to give us these devices, right? That's what people will say to defend console makers. If they don't force everyone to purchase through their walled garden, they can't make money. But apple has the weakest argument of all. Their margins on iphone and ipad sales are absolutely insane. You go buy a iPhone 12 Max Pro today, say the largest storage size, and they make almost a grand in pure profits off that sale. Let that sink in. Apple makes INSANE profit margins on the device off the sale. Billions every year.