I thought this behavior disappeared ~10 years ago.
However there are bugs in USB stacks, especially now you can do so many alternate protocols over USB-C.
https://www.jefftk.com/p/malicious-usb-sticks
There's nothing fundamental in the USB spec that lets devices execute code on the host.
I thought this behavior disappeared ~10 years ago.