I'm afraid this is nothing new.
In the UK we have CHIRP (Confidential Human Incident Reporting Programme) for Aviation and Maritime environments. Many years ago, post 9/11, security was stepped up at UK airports on all personnel going 'air side'. This included flightcrew, of course, and it was right and proper that checks were done
But there is a way to do checks and back then a whole plethora of new security people were taken on by private firms (not Government Agents) to do body searches. A great many of these new security people were professional and courteous but the jobsworth type who, when given a uniform to stand in will become mini-Gestapo, were totally over zealous and seemed to take great pleasure in winding up some air crew.
At that time there was a sudden increase of reports on CHIRP from aircrew who had been hassled and rousted by some of these fools. At least two reports I remember spoke of the pilot's performance being quite severely negatively affected be cause he had just een through such a horrid experience and wound up before geting to his aircraft. One pilotr had the Police summoned to him and he was told he would be arrested if he did not comply to a search. A couple of pilots were turned away and not allowed through because they objected not to the serach but th way in which the search had been carried out. At the time it was becoming a worrying thing for the authories as so many flightcrew were messed up by these fools who seemed to take great joy in doing it.
All pilots know the importance of security. In all the cases I heard of back then I do not recall one pilot saying they did not understand why they were searched. Their problem was the way in which the searches were carried out and the sheer bloody-mindedness of the so-called security operative. They did not have the latest scanners we talk of above back then.
As far as I recall the CAA issued new guidelines and the problem, or at least the reports, seemed to die down a lot. Either that or the crews just became innune to the ignorance and zealousness of some of the security people.
I have seen it a lot around airports. Mosr security people/Police etc., are just fine when you approach them and they are respectful and helpful. But some just love to roust anyone and it seems the lower down the ladder they are (most are likely on the minimum wage too and many are not happy in their job) the more they like to wield what power they have.
I will reiterate though that the majority are not like that. Problems arise when you do hit oneof these jobsworths and if that happens once a week then it happens far too much.