On the one hand, I can see how this could be useful to mitigate vulnerabilities from malicious USB charge stations. (See: https://en.wikipedia.org/wiki/Juice_jacking)
On the other hand, what happens if you need to connect an "unapproved" keyboard for the first time, and your hardware keyboard is malfunctioning?