The guy told you to pull down your pants.
He had no way to know that you were going commando.
Imagine his surprise when he turned around and found your junk all up in his face.
You say that you felt somewhat violated...?
I'd bet you weren't the only one feeling little violated that day.
Wear underpants and make sure they're clean in case you get in an accident on the way to the airport.
When a TSA guy put his hands on me I just said in a loud clear voice "No sorry guy, keep your hands off me I am not one of you guys." He pulled back immediate!