This is the hard question.
What in the world could possibly be enough to where enabling sideloading is ONLY possible by the owner of the device, and not just someone who looked over your shoulder for an hour and saw you type in your passcode+Apple ID, and has now swiped your phone to install spyware that utilizes a 0-day to hide itself from you?
Do you worry about that with your MacBook or Windows laptop?
Is it an attack vector? Sure...I guess. Is it a reasonable reason to disallow sideloading apps? Absolutely not.
I own a mac and love it, but if Apple ever attempts to lock it down the way they have the iPhone/iPad, myself and many others will leave that ecosystem forever.
but my boomer mother? whewwwwwwwwww if someone told her she had to install a 3rd party app store to see pictures of her friend's birthday cake or some terrible grape salad recipe, she'd do it. and she'd give them all of her personal info too.
sadly this is the norm, not the exception
The "right" way to fix this is:
1. Apple allows users to download/install software that is not on the app store. If a user owns the device they should be able to do what they want with it, even if it's "risky" or whatever. But this means those users that feel the most comfortable continuing to only use apple-approved apps in the app store can continue to do so.
2. Software downloaded from the app store, using apple servers and services, must give Apple the cut (30%) they ask for. If the app doesn't use apple's infrastructure or payment system, apple shouldn't have any right to a cut of the payment.
Apple has billions of dollars of revenue at stake here, so of course they're going to fight it as long as they can.