The vast majority of consumer products that contain a microprocessor do not allow the user to modify the software that runs on that microprocessor. Look around at all the microprocessors you use on a daily basis. Your set-top box, your television, your refrigerator, your DVD player, your car's infotainment system, etc., etc. Apple is not the exception here--PCs are the exception, Android devices are the exception. There's no legal basis (in the US) for requiring a manufacturer to enable end users to run whatever SW they want on all consumer devices. None.
Microsoft didn't run afoul of antitrust regulators because there's some law somewhere that says users have the Stallman-granted right to run whatever SW they want on whatever CPUs they own. They ran into problems with antitrust because they had a de facto monopoly on operating systems (well over 90% of PCs at the time) and used that monopoly to stifle competition for applications. Apple has (give or take) 50% of the smartphone market.
If users get fed up with them then the users can pretty easily flee to Android. It's that simple. If Apple had 90% of the smartphone market, then it would be a different story.
Maybe someday a different law will be passed--but that's a tricky law to write if you somehow want to target Apple but exclude all the hundreds of other 'appliances' that disallow sideloading.