Instant money. Meanwhile the telecom company has to sell the debt at a massive discount to a collections agency or spend a ton of money collecting on it. That's assuming it can be collected on at all from someone that might just be running a scam.
With a locked phone, the phone just stops working and loses most of its value.
A rule forcing carriers to unlock phones after the term is up is fine. Forcing them to do it before is illogical. How many people are going to pay for two plans on one phone because they didn't like the first plan? I doubt it's more than those who will immediately abuse this rule and stop paying for the phone. I don't see the benefit to society here.
Otherwise, folks in this position should just buy the phone outright and unlocked so they don’t have any issues like you’re describing.