By chance, a user discovered and posted images of a new feature on Reddit until then unknown on iOS 10: an alert when detected moisture in the Lightning door.
Apparently, the iPhone has not known exactly since that generation (it is possible that only the most current ones: 6s, 6s Plus and SE) are some kind of new sensor there at the door that can inform the software when it detects the presence of liquids.
iPhones have always had humidity “sensors” in various internal positions, but they simply change color when they come into contact with liquids and serve to inform Apple (or an Apple Authorized Service Center) that the device in question has been wet / dipped in any way, which would violate your factory warranty.
Despite the warning, the user who prefers to be able to simply ignore it and keep the cable or accessory connected to the iPhone in the same way (knowing the possible consequences). Ideal with electronics, always ensure that they are completely dry before using / turning them on again.
Update · 06/21/2016 s 11:00 am
The reader Wesley Cariolano He said in the comments that the alert appeared in a test on his iPhone 6, so the sensor has been around for a long time (not just in recent generations).