One device does not take a backup simply because it is plugged in.
Plugging the device in only charges it. It may sync, but this can be stopped.
The only way the device would be restored from an existing backup is if the user chooses the "restore" option. Since your backup is encrypted, this would require entering the password.
So what happened to bring about this question other than someone else plugging in their iDevice?
I am not too familiar with the encryption in iTunes, compared to Android. Also because I have to dump my content into my laptop and then use iTunes to sync it, it leaves me in many vulnerable spots compared to an Android device I was using prior. The person that used my laptop to charge his ipod is also someone I don't trust honestly so I wanted to get some knowledge drop from the community to protect myself better. Thank you.