The reason that custom restoration and an open-sourced OS is not supported by Apple is because of the lack of technical background for at least 95% of all iOS users. This 95%+ includes a lot of jailbreakers. Of the 95%, at least 80% of them are jailbreaking solely for pirating AppStore applications, and because at the end of the day Apple is still a business that thrives more on its apps for the easy penny than the hardware itself, it has to keep barring hackers from opening channels or make it extremely annoying for pirates to pirate apps. The latter <20% of the 95% are jailbreakers that actually pay for what they use, but of this sub-20% group of users, less than 20% are actually security conscious of what goes on in the iOS itself. If Apple were to allow custom restoration, devices will be stolen left and right, and they can simply downgrade them and sell them on the market for a significant portion of the MSRP. If Apple were to stop or not care about their OS security, and leave bootrom exploits open as well as bootchain exploits open, hackers can openly and freely steal devices and downgrade them and sell them even if open custom restoration is not allowed. And, if bootrom or bootchain exploits are left open, considering how 99% of users leave their Wifi and SSH on around the clock, and more than likely do not have the proper security setup for their home network, their data can and will be sapped by hackers right under the user's nose without their knowledge until it's too late.
Playing devil's advocate, Apple is doing a hell of a job keeping iOS and OSX users safe. On the other hand, for non-developing hackers, it throttles the ability to clean your device out and start fresh if you're looking to jailbreak outside of a relatively minuscule window. Apple has openly "accepted" the jailbreak community by taking aspects of tweaks and incorporating them into the iOS, and giving credit openly to dev teams for finding exploits in their OS. But because these exploits are published, hackers can take advantage of devices knowing that they're jailbroken, and reverse engineer the exploits for themselves.
TL;DR: If Apple allowed custom restoration, that means exploits will be left open and that's the same as going "Here's my $600+ MSRP device, have it for free, and you can charge all you want on my credit card linked to my AppStore so that you can sell the IPAs to the Chinese to benefit pirates and steal from the developers, I won't call the police."