Another scenario I can imagine is a charge controller reducing the maximum charging current as the battery ages based on information stored in the controller's memory, which would be incorrect if the cell is replaced. Of course, it would be unusual to replace a cell with one in worse condition, so it would also be surprising for that to be a safety concern.
It isn't, but there are some controller circuits that switch off permanently if the voltage falls out of range, making changing cells more difficult.
1. The MITM hardware could be installed into the screen that's already paired with the iPhone, so the serial check wouldn't help
2. The MITM hardware would make the screen look non-genuine regardless of serial, so the serial check wouldn't be needed
It’s not just a warning. Functionality is flat out disabled. Swapping parts between 2 iPhone 13s boinks them.