The reasons behind it are pretty strong. A lot of repair stores use second hand, or fraudulent parts which damage the user experience. So for an owner getting a repair, if they don’t see warnings, they know the repair was done right. And as a buyer, you can tell the phone is using all official parts.
It’s also likely used to ruin the resale value of stolen parts from the factories.
Edit: and preferably let them buy the batteries in bulk, without having to have the phone on hand which just causes unnecessary delays.
The thing is there is very little drm here. There is no complex crypto chip on the battery. The battery just says “my id is 36382” and the phone goes “that’s not the id I expect”. Which makes it impossible for fraudulent parts to replicate since even making the chips respond identically won’t work.
Yes it has some downsides. But I think the trade off is reasonable. If you want to do an unofficial replacement, you still can. Just ignore the notification that shows on boot.