This is just one of many reasons why you should not ever stick unknown things in your healthy ports (or your healthy things in unknown ports). Not without protection. Safety first. But I'm a firm believer that people should be able to consent to this kind of behavior if they really wish to.
I've often wondered if there was some condom-like* attachment available that acted as a go-between for the USB port and a connected device that would prevent/mitigate some of the issues with sticking unknown devices into ports.
* There is a device called a 'USB Condom' but it's only for charging purposes, and completely restricts data access.
In principle, nothing outside pure mathematics is certain. In practice, a USB stick you ordered from Amazon and just took out of its packaging is far less likely to carry a virus than one you just found lying around.