To protect their business model
In the US (and Canada) they sell pay as you go phones below cost, then charge a ridiculous amount for minutes that expire after 30 days. They expect to make back the loss on the phone many times over on the minutes. The phones target poor people with no credit that can't get a normal cell phone.
But people would go into Walmart and buy 10 phones, unlock them and resell them. This was not illegal until they made unlocking illegal.
Almost forgot to say that the people buying the phones are drug dealers and terrorists...