Once again, Apple has demonstrated its disdain for people who want to do simple repairs on their equipment. This time, Apple has changed the iPhone's firmware so people who replace an old battery with a new Apple-branded battery will see a "Service" message on their phone that won't go away. The Service message says "Unable to verify this iPhone has a genuine Apple battery. Health information not available for this battery." The phone also will also refuse to show any diagnostic information about the health of the battery. The only way to avoid the message and be able to see the health of the battery is to have the battery replaced by an Apple Authorized Service Provider who has access to Apple's proprietary internal diagnostic software.
Technically, it is possible to remove the microcontroller chip from the original battery and carefully solder it into the new battery you're swapping in, restoring the Battery Health feature—but the procedure isn't for the faint of heart, and it's an unreasonable requirement for any repair, much less something as simple as a battery swap.
Fortunately, your replacement battery will continue to work perfectly fine, and you'll get all of the benefits that come with a new battery—we've confirmed that this doesn't throttle the iPhone's performance on a healthy battery, for example. But you won't be able to easily see your battery's health and know when it's time to replace it.
Then again, this is a huge problem for iPhone owners who may not know about this new, sneaky lockdown, and it will undoubtedly cause confusion: they'll replace their own battery and notice the "Service" message, then begin troubleshooting a problem that isn't there.