You may own the device, but everything running on top of it is part of a service in control of Apple.
It would be great if vendors would be mandated to clearly separate communication about the product and the services on top, so they would have to compete again on actual product functionality, but so far it's not the case...
Unlocking/jailbreaking/installing your own software should be legal. I own the device, I should be able to do with it as I please without breaking cybersecurity laws. The issue is this covers IP/Platform Code and covers jailbreaking as that’s a form of reverse engineering in violation of the agreement you signed when you bought the device. It fucking sucks.