Now question; Should the law and courts support this contract? Explicitly you are asking the legislature and courts to modify the initial promise you made the "Widget" provider.
The contracts with the phone companies are for the service not the puchase of the phone.
It's not that simple. First off, if there is a contract, then there is a remedy, either as set forth in the contract or through a civil action between the parties to enforce the contract. So if, for example, you bought a product with some provision not to modify it, and then you breached the contract it is perfectly reasonable for the other party to seek damages from you. But it isn't reasonable, for example, to criminalize the action you took which led to the breach of the contract as a way for the other party to (a)prevent you from negotiating a different set of contract terms, and (b)free them from the expense and market pressure that results from enforcing their contract themselves.
Using the examples of automobiles, there is nothing in the principles of a free market which would prohibit a car manufacturer from requiring its customers to only have their cars serviced at the manufacturer's dealerships. Of course they would be likely to suffer a loss of sales in the marketplace, since consumers would not want to pay the higher repair prices that would be the likely result of the contract.
To avoid this problem, the car manufacturer comes up with a different plan. It persuades the government to pass a law making it illegal for anyone to have their car repaired by anyone but the dealers of the original manufacturer. No doubt they cite some reason, like better compliance with environmental laws. Under the law the customers no longer have the opportunity to choose where they obtain service for their cars, so the car manufacturer avoids the loss of market share it would otherwise suffer.
The vendors are welcome to set whatever terms they want for their sales, provided that they don't collude in violation of anti-trust laws. But creating laws whose purpose is to enhance their bargaining position with their customers is not good for free markets or society.