"I was only doing what I was told" has been the precursour to some of the most horrific events in human history. Rules are no excuse for loss of common sense or just being an ar*e.
It is essential that all crew members get through security as fast as possible, otherswise the system can break down.
Crews go through the rigmarole of security checks and get these nice laminates passes so when we get subjected to sarky comments, blatantly obvious idiocy and bad attitudes from security staff its no wonder people get annoyed. All pilots are trying to do is get to work.
A bit of understanding goes both ways.