The app store is a closed environment where they can dictate some terms. But don't forget that the developers PAY THEM to use it, and as such their terms cannot trump the consumer laws that exist to protect against abuse.
(By the way, "my shop, my terms" have already faced legal scrutiny, some of which were found to be illegal - popular judgements include that shops cannot refuse to serve people of colour or gays.)