I can understand the logic of making it illegal to purchase a heavily-subsidised SIM-locked phone, and then unlock it, so you can use it on a different network. That's basically fraud, when it comes down to it. I don't know if things are different in the US, but in the UK mobile phone market, very often expensive phones are heavily subsidised by the carrier.
But certainly it's wrong to prevent unlocking in cases where the phone is not subsidised. But then the question arises: how does the company carrying out the unlocking know whether or not the customer has the right to ask for it to be unlocked or not?