You can do whatever you want with your phone too, it isn’t illegal to jailbreak an iPhone for example.