Why doesn't the iPhone disable the data transfer pins until unlocked?
By the way they don’t use the same pins as USB of course because they have their own connectors. And disabling access to the audio dongle while the device is locked wouldn’t make sense.