So, technically using software to unlock digital carrier blocks on your phone in the US is a violation of everyone's favorite draconian copyright legislation, the Digital Millennium Copyright Act. Unlocking your phone yourself could be seen as breaking a "technical measure," akin to cracking a DRM package (which, in most cases, is illegal). The Library of Congress can grant specific exemptions, like it already does for rooting and jailbreaking, but the latest one in 2012 was passed over without renewal.
The legality of certain phone modifications in the United States, particularly those that allow phones to be used on wireless carriers for which they weren't originally intended, is currently on a congressional see-saw. Every three years, the Librarian of Congress has to approve or extend an exemption of the infamous Digital Millennium Copyright Act (DMCA) to allow or deny consumers the right to unlock (read: carrier unlock, and in some cases rooting/jailbreaking, but not unlocking bootloaders) their phones by circumventing digital rights management.