To illustrate this point, imagine your phone is a rather complicated DVD player. DVDs have copyright protection, and as such, you may not modify your DVD player or DVD discs to extract or modify (or even play!) the DVDs on an unlicensed player. Similarly, you may not do anything remotely like that with Apple copyright-protected music or video files, or any other digital media copyright-protected by Apple. This means if suddenly all the data on your phone were bundled up and "protected" by Apple, you would have no right to said data, other than the right to use them the way Apple wants you to.
Of course, the DMCA has been amended over the years to allow exemptions to this (which are reviewed again every three years). Some allow jailbreaking, some allow remixing of media. Some allow disabled people to read their e-books (yes, this was illegal for a while due to the DMCA). You can only carrier-unlock your phone if you bought it before 2013 (seriously). Oh, and tablets/smartwatches can only be jailbroken since 2015.
A 2010 ruling determined that even if your purchase a phone, you do not own its software - you are merely leasing the phone software from Apple according to their EULA. You may find a way to modify their software, but you'll also be breaking the law.
[0] http://linuxoniphone.blogspot.com/2010/04/ive-been-working-o...
edit: in 2012, it was deemed not a violation of the DMCA to jailbreak a phone. Whoops.
I don't know what the consequences of exploiting a hole in their security implementation or possibly violating their ToS or EULA.
Trying to profit from such an exploit commercially would test the waters by attracting Apple's legal department.