Legal = (equals) "the state and country and government does not have an issue with you doing it"
Legal != (does not equal) "the company that offers warranties for the product in question does not have issues with you doing it"
Legal != (does not equal) "the company that makes the product has no right to make a patch that you, knowingly installs, patches and blocks you from jailbreaking said device (until a new loophole is exploited allowing you to jailbreak your device again).
in other-words: "same old same old"
and in the end... honestly...
it's not "legal", it is simply "NOT illegal"... there is a HUGE difference between the two