In my opinion there are two sides to it :
1) If the Service Provider (Sprint, AT&T etc.) gives a subsidy or discount as part of the contract, they should be allowed to network lock the phones since the consumer has not paid the full price of the phone and not fulfilled the contract. However, with the completion of the contract, the service provider should unlock the phone for free.(I am only talking abt the network lock here)
2) If the consumer has paid the full amount, then the phones should come unlocked.
As far as 'Jailbreaking' or installing softwares is concerned, the consumer should have the right to do so in any of the above 2 cases since he is the owner/user of the phone. The Manufacturer or Service provider has NO right to lock that portion. However, they should have the right to void warranty as there is a chance that the user may install potetially harmfull sofware on the phone thereby damaging it.
However, if the law comes that people are able to network unlock their phones legally, there is a chance that the service providers might stop subsidising the phones and ask for upfront payment.