To be fair, if they don't do this, they will need to increase prices in poorer countries - otherwise someone will simply buy the phones on the cheap and resell them in more expensive areas.
Sounds like you're defining a failure of the free market
If these devices are so cheap the marginal cost justifies the lower price, why isn't market competition eating into their margin in the more affluent countries?
Sounds like somebody's got their finger on the market balance
A lot of times the cheap prices in low cost countries is (partly) subsidised by the higher profit in more expensive ones. Essentially buying market share and brand recognition for some lost revenue, hoping to recap it by cornering the market and rising prices in the future. At least that's the theory.
Love how you're getting downvotes for pointing out the exact reason.
Diversion is often also a means to fund crime and terrorism when done at scale.
In some cases of diversion the product also gets altered by changing valuable content for cheaper ones. A good example of this would be medicine or liqour. Worst case is that the end user gets fake medicine.
Making your product affordable in a region also increases consumer safety as it will curb counterfeiting. In the case of phones this can lead to exploding batteries or electrocutions.