Some interesting comments re unlocking the iphone:
Its not the law that binds you its your contractual aggreement by pressing "agree" Breach of contract and breaking the law are two diffrent things... that provide diffrent levels of punishment. and im fairly certain that its not the first time in an APPLE TOS or any other companies TOS that that statement has come up. [Link]
In the US, it appears that the "law" with respect to cell phone unlocking is an excemption made by the US copyright office, under provisions of the DMCA. In other words, handset makers and carriers can't use the DMCA to protect their business model by disallowing the use of the phone with other carriers. This exemption can potentially go away as exemptions are reviewed every three years, per the terms of the DMCA statute.
I don't know if EULA and TOS terms that prohibit unlocking are enforceable. That is a different matter.[Link]