Legally so, but not rightly so. Apple has arbitrary and unreasonable rules. They are not in a morally justified position when they exert those rules, even though they are legally able to.
Now, in this case, it is obvious what the right move is for the developer. They have to ship their app on android or windows phone instead of iphone. If apple refuses entry into their walled garden, the developers should take their app and go somewhere else. If enough apps do this and become popular, apple will change their rules.
I think it's still rightly so on Apple's part: Apple can set the rules however they like because the App Store is their playground. If you want to play there you have to abide by their rules - even if those rules are contradictory or arbitrary.
I do agree that developers should take their apps to other platforms (most notably Android). I don't expect Apple will change their rules, but customers may switch to other devices. I've personally switched from iPhone to Nexus 5 because some of the apps & features I wanted were blocked by Apple.
Apple's rules aren't arbitrary, they are built around a fairly clear set of aims about which Apple have been fairly public. You may disagree with those aims but that doesn't mean the rules are unreasonable or arbitrary.
I'd also say that as an iOS user and an Apple customer, one of the things I like about the AppStore is that there is a degree of curation, that they do have rules. I don't agree with all of those rules but over time the rules have improved and, on balance, I personally like the end result more than the alternative.
What is more arguable as unreasonable is that the AppStore is the only means of loading Apps to your phone without a developer license but I don't think changing the AppStore is the right solution.
Personally I'd argue that sideloading should be possible (though would need to be enabled somewhere down in the guts of the settings with warnings and all), but I wouldn't change the AppStore which is a service with a specific aim which it meets pretty well.
Because it fits. Do you think that Wal-Mart doesn't have rules for vendors?
Perhaps Apple is more mercurial and arbitrary. But the institutional arrogance is the same.
As a manufacturer, Wal-Mart is your best friend and worst enemy. They pay you promptly and order lots of stuff. But they demand steep discounts and punish you harshly if you fail to meet commitments, and you must be able to rapidly ramp up your supply chain when their demand grows.
Your analogy only address's the issue form the consumers point of view.
What about if you make a product, should you be able to force a distributor to carry your product?
It functions as such. Developers make a product, they convince Apple to stock that product, and Apple takes a cut when they sell it. You can argue that it shouldn't be like that, but you can't really argue that it ISN'T like that.
The only thing you can really argue is that they should allow other app stores to exist that aren't under their control. And frankly, they do exist on jailbroken phones and if you want that you can jailbreak your phone, or get an Android.