There are enough intelligent people who work security and are reasonable like i believe DaveyG. I can imagine that security staff do get abused on a regular basis, however some do completely and utterly deserve it. I'll give a few examples from an airport i used to work at as ground staff.
Firstly i tended to see that air crew were usually given more scrutiny than ground staff. Great for me as i was ground staff at the time. Also there were 2 staff entrances, one run by airport security and one run by a private security firm employed by the airport. I always chose to go for the airport security run one if i had time to do so as they were 100 times more professional.
when i went through the private firm run one, i saw a few things that digusted me at the time.
1) A member of the security staff brought through a can of redbull (250ml) to which the person running the scan 'confiscated it' saying ohh i'll have to take that off you that's more than 100 ml chortle chortle and put it on the desk by the x-ray machine. Then the security member who had the drink 'confiscated' from them sat by the x-ray machine to take up their duty and started to drink from the can of redbull that had been confiscated previously.
Similar things happened with coffees on a fairly regular basis.
Now i personally think the rules are stupid, by if they apply to me then they apply to everyone.
To the people who say proffesional pilots need to be able to deal with stress etc. i agree. However why intentionally annoy someone before they start work is beyond me.
I still want to know what the actual rules are. What can and can't a security person do to me. What are my rights. When can my pass be revoked??