LOL the only answer I'm looking for is to: why did the phone lock it self back?
The only way anyone can tell you that is to have the phone in his hands, unlock it and see if he can get it to lock itself. There are too many possibilities for anyone to pick one of them and tell you that it's what happened to your phone.
All anyone can do here is give you solutions to your problem.
I'm wondering why you (or your friend) chose a T-Mobile phone to use on the AT&T network. That may limit your friend to Edge data speeds.