I rebooted my phone while it was connected to the PC and saw a notification about a failed device installation. Looked up the text and the code, and it turns out my phone exposes a certain way to update its firmware right after reboot for a short while. The data was transferred by the phone to the computer, and there's an entry about what device appeared for a second, and it's different from the phone's normal info, visible in the same registry folder.
Normally though you see in guides about changing a phone's firmware that you need to hold special keys for several seconds to enter debug mode. So this uninvited exposure of another device ID doesn't seem right.
So that got me thinking: Is it possible to modify a phone's (or tablet's) firmware or otherwise do something unexpected by user if you connect it to some random bus station's USB charging port and reboot?