I think, irritating though it is, while you are in their sandpit, they can do what they want so long as it does not involve some form of assualt, imprisonment or human rights infringement regarding race, sex, disabilty etc.
Asking to see documents, even by a shoe checker, is probably acceptable and being rude is now inevitable.
If we have to fly, I guess we have to try to grit our teeth and rise above it all.