How can this even be a thing? My simplistic understanding is that if the phone is locked to a given carrier (down in the baseband part of it) sending a particular magic string of digits to it (the baseband) will clear that flag and it will henceforth be unlocked. Permanently. Is there really a corresponding re-lock operation?
In Canada at least, we went through three stages. 1. Buy locked second-hand phone, send $20 to shady operator somewhere to get unlock code, unlock. 2. Buy locked second-hand phone, call up the carrier it is locked to and demand the unlock code, which (after the law changed) they had to legally give you free of charge[1], enter digits, unlock. 3. No more unlocked phones since carrier locking is now illegal.
Doesn't that mean that in Canada, reaching down and "re-locking" a phone is also illegal? And since we're generally a bit behind here compared to the USA, how can such a problem even exist any more?
Note[1]: My mom loves her landline phones and refuses to use a smartphone. So she has one of those cellular-to-phone-jack gateways. I procured a spare replacement via classified ads. It was locked. Called the carrier, got the digits. Entered them via DTMF keypad on an old fashioned phone. I could hardly believe this would work, but it did! The thing unlocked and henceforth worked with any SIM.