They did it to kill two birds with one stone - Prevent repairs, and to prevent theft, and it works.
A few years ago you would use Find my iPhone and see your stolen device was halfway across the world in a few days because it was stolen for parts, stripped down, remade and sold as refurbished. Now it's much less common because it's so much harder.
If they only wanted to prevent theft, they could have had the same system, but only lock iPhone parts once that iPhone is reported as lost (i.e Find my iPhone was used on it, and it wasn't later confirmed as being found)