Why can't AT&T unlock it?
There may be multiple reasons.
Crap reason #1:
If you bought it used, you are not the original owner, and they only deal with the original owner.
Crap reason #2:
The IMEI has been active for less than 24 months.
To expand:
I purchased an iPhone 3GS at release (June 2009).
That meant it would be eligible for an unlock in June 2011, correct? Wrong!
I took it into an Apple Store in May 2010 for a repair, and it was swapped out with a different iPhone 3GS.
I tried to get it unlocked, but AT&T refused. I called and complained to multiple people at AT&T. They don't care. Their policy is that the IMEI registered *must* be 24 months old, regardless of contract.
That meant I had to wait until May 2012 to get it unlocked, 11 months after my contract was up.