USB is dirty. Just like you’d never stick your body parts into a mysterious public hole, neither should you plug your iPhone into a public charging station. iOS is pretty good at rejecting unknown connections from USB, but why take the risk?
There are a few ways to make public iPhone charging safe. One is to plug into a power outlet using your own plug and cable. But what about on a plane or train, or other public spot where only USB outlets are available? Or a friend’s computer, one that might be riddled with malware? Then you need a custom USB cable, one that only passes power, and not data. The good news is that, if you have an old Lightning USB cable laying around, you can easily fashion your own, just by yanking out two pins from inside the USB plug.