when u buy a phone for them - they offer it at a lower price because u but their services as well
the lower price of the phone - the lock on it - and the subscription - are all part of a contract.
u can take it or leave it - but once u have take it - it means that u have accepted the terms...
all is legal there...
if u don't want a locked phone - the only solution is to buy from the mannufacturer