Apple, as a company, does not condone jailbreaking - the practice of removing software restrictions on iOS devices. However, it is legal to jailbreak an iPhone in many countries, including the United States, under certain circumstances. Despite this, there isn't any official statement from Apple about the legal status of jailbreaking.
There could be a few reasons why Apple doesn't take a more aggressive approach against jailbreaking. First, jailbreaking provides users with access to a wider range of features and customization options, which could potentially attract more customers to iOS devices. Second, it's possible that Apple recognizes that some users will inevitably choose to jailbreak their devices regardless of any technical or legal barriers in place, and may prefer to allow this behavior to occur under controlled circumstances rather than drive users away from its ecosystem entirely.
That being said, it's important to note that jailbreaking can lead to security and stability risks for users and their devices, as well as potentially voiding warranty and support from Apple. Ultimately, the decision to jailbreak an iPhone should be weighed carefully by each individual user.