1. It's malware from the perspective of the entity whose computers it was installed on. To respond to your meta-point, phone locks are merely a technical control to help ensure consumers abide by their contractual obligations. At least, this is the case since companies have been obligated to offer unlocks for phones whose contracts are paid off.
2. Presumably, it's a combination of a number of mechanisms, like judgment-proof consumers or identity thieves unlocking and reselling devices.
Are they really obligated to offer unlocks now? I stopped getting subsidized phones 5 or so years ago (and it seems carriers mostly don't offer them anymore anyway), but I fought tooth and nail with multiple carriers to get my paid-for device unlocked, and usually the answer was "piss off".
Recently my parents switched carriers for whatever reason, so I had to get a new phone. Honestly I would have kept my Note4 for another year, but whatever. Being a phone from, what 2014? it was well paid off at this point.
1. I went to the AT&T Store, asked them to unlock my phone. Was told, no sorry, we don't do that here. "Call the support line."
2. Called the support line, waited 20 minutes, was transferred to the correct department, waited another 20 minutes. Was told, we don't do that over the phone anymore. Go to this website here.
3. Went to the website. It asks for the number that is printed behind the battery (y'know back in my day, you could remove batteries from the devices you owned and replace them) Next, it asks for some device ID Number that you need to ask the phone for. So you turn it back on, follow the directions, etc. Then you submit the form. Then they tell you it can take up to 48 hours to get the unlock code.
4. Wait.
5. Receive absolutely no confirmation or acknowledgement that your request was received or actioned on at all.
6. Buy a new phone because it isn't worth the hassle.
2. Presumably, it's a combination of a number of mechanisms, like judgment-proof consumers or identity thieves unlocking and reselling devices.