Sure. But the same generality applies to contracts, especially contracts of adhesion - their results aren't necessarily beneficial to society, or morally good.
Phone unlocking itself is definitely beneficial to society and morally good. An incumbent network provider being able to leverage a small market inefficiency into indefinite bondage is not a good thing, regardless of how its justified. Never mind the e-waste and surveillance issues.
What’s morally bad about unlocking a phone? Literally suggesting that it is morally bad to modify a device you own. If att doesn’t want people to mess with these phones than they shouldn’t sell it.