Copyright scholar Tim Wu has a great little piece on Slate about the legality of iPhone unlocking. Bottom line: it's legal and it's fun!
Did I do anything wrong? When you buy an iPhone, Apple might argue that you've made an implicit promise to become an AT&T customer. But I did no such thing. I told the employees at the Apple Store that I wanted to unlock it, and at no stage of the purchasing process did I explicitly agree to be an AT&T customer. There was no sneakiness; I just did something they didn't like.
Meanwhile, lest we forget, I did just throw down more than $400 for this little toy. I'm no property-rights freak, but that iPhone is now my personal property, and that ought to stand for something. General Motors advises its customers to use "genuine parts," but it can't force you to buy gas from Exxon. Honda probably hates it when you put some crazy spoiler on your Civic, but no one says it's illegal or wrong.
The worst thing that you can say about me is that I've messed with Apple's right to run its business exactly the way it wants. But to my mind, that's not a right you get in the free market or in our legal system. Instead, Apple is facing trade-offs rightly beyond its control. When people unlock phones, Apple loses revenue it was hoping for, but also gains customers who would have never bought an iPhone in the first place. That's life.