They control aspects that can adversely affect others in the community --- with disclosure and mutual consent.
Restricting repairs to your iPhone only affects you and Apple's profits --- and there was no disclosure or consent --- i.e. buyer's weren't told in advance.