Surely this comes down to what reasonable expectations are held by the customer. There are microcontrollers you can buy that require a soldering iron and USB breakout board in order to run your own software on them. I think that's pretty reasonable, but it would be a ridiculous requirement for a desktop PC purchased at Best Buy.
The question becomes: what are the reasonable expectations for installing third-party software on an iPhone. Personally, I think the overwhelming majority of iPhone owners expect and even highly value the fact that Apple (supposedly [0]) vets all third-party software on the iPhone, and it's generally more difficult to accidentally install malware or break your device than it is on other computing platforms.
[0] As I've said before, I think Apple actually needs to be more restrictive, because a lot of useless/broken/scammy stuff makes it into the App Store.