The primary purpose of sideloading apps is to get the app downloaded and play it for free. This in turn creates a security problem when you allow for anyone to side load apps.
We can see this in Windows and macOS where people who have full access to a computer generally get malware onto their computers.
What macOS and even Windows is moving torward is a containerized system for programs to run. This is going to be the best solution eventually. This is at the cost of performance (especially Windows which sees a 30 percent drop in gaming performance ).
I think to allow external app stores would be a vetting service and also Apple would have to create a sandbox for the apps and also possibly some analysis to make sure that the side loaded apps aren’t just someone’s else’s stolen video game. Unfortunately until some kind of law is done Apple has no incentive to actually allow this to occur.