It was a female agent, that doesn't mean that it's okay to start groping someone without warning.
The fact that the TSA agent a woman doesn't automatically make someone else comfortable with whatever liberties the agent feels like taking. It's still likely worse if it's a man doing it, but sharing a gender isn't an excuse for the agent to do whatever they want.
Which is a very effective technique.