Every platform was built by somebody. If I buy batteries, should the engineer who designed those batteries (or, heck, Alessandro Volta) be able to place restrictions on the use of those batteries? If I buy a car, should the seller be able to place restrictions on which roads I drive on? If I buy flour, should I be able to use it in recipes only with ingredients bought from the same company?
Apple should by no means ever restrict the ability to place code on a device that they sell. Restrict things from the App Store? Sure. Restrict devices to only use the App Store? Absolutely not.