How does it do that? Its a lock to force people to stick with a provider, and pay through the nose in other ways. Phone plan rates in the US are terrible, restricting peoples ability to change provider through artificial means doesn't provide better rates.
It’s the same difference as a home mortgage vs unsecured credit card debt: When the threat exists that the lender can repossess your home if you don’t pay… they don’t have to worry as much about you not paying your mortgage, so they can offer a much lower rate.
If, 3 months in, you find yourself unhappy with your carrier, you can still pay the remainder of your phone cost ($875) to own your phone outright and walk away. In that time, you’ve saved $75 off the full price of the phone.
Arguing that US carrier prices are exorbitant is not relevant to whether carrier locks and phone discount credits are worthwhile or cost effective.