iFixit also found that when it used a genuine Apple battery but replaced it itself, the message still displayed. Unless Apple authenticates the replacement using software while doing it itself, even official Apple batteries are not recognised, and you lose the useful Battery Health software feature.
Battery Health was introduced in iOS 12 to show you how much of the original capacity of the battery remains and whether your iPhone is performing at the peak of its possible powers. As and when the overall percentage drops into the 80% region, Apple will replace your battery for a small fee.
This move shows that it really wants that cash from you rather than you saving money by doing it yourself or going to a popular high street brand like iSmash. Blocking a software feature in this way is quite aggressive and is indicative of how even if you buy a phone outright from Apple, it still tries to control the way you choose to use it in the future.
If this view sounds a bit pessimistic then OK, Apple is also trying to ensure that official replacements are commonplace. A dodgy unofficial battery in an iPhone could be dangerous for the user if installed incorrectly. But the move is in line with Apple’s history of user hostile decisions like sealing iPhones shut in the first place, using screws with non-standard designs and gluing components together in MacBooks rendering them unupgradable.