Imagine if Microsoft did this on PCs. a) prohibiting the installation of non-windows store software (sideloading) and b) insisting that all purchases done via apps give them a 30% cut. I think this is a ridiculous practice on the behalf of Apple.
Apple says they do it because of security reasons. Windows' open and liberal way of doing things made it a fertile ground for millions of viruses. But I still think every OS should be open for developing and distribution of software no matter how serious malware threat is.
windows, is based because of the underlying os system fundamentals. once you've sandboxing in place. i.e apps are restricted to user level. then malware becomes something of the past.