Spot on Dutchy!
I can understand how some might find it offensive though to be subject to these checks especially when the pilot in command has the legal and final authority as to the disposition of the aircraft and all those on it.
Are these security people claiming the Captain is carrying DG's or forbidden items which would mean the Captain is breaking the law? And not to mention risking their employment and super?
They might as well charge him/her with a federal offence there and then!
A little respect might be in order!