If you have traveled enough, you will know what being respectful to travel security agents that suggests. Airport and border personnel have difficult jobs but they also hold a power that can be easily abused. Running the gauntlet of the good and the bad can cause considerable stress.
Airport security is pretty straight forward -usually. You may get delayed on purpose until the light bulb comes on that tells you they are fishing for some kind of gratuity. I have practiced my “stupid” to a degree where they have to ask for their tip. That kind of check-through is something you most often find in smaller countries. Figuring out what the right thing to do can be difficult. Figuring out a way to make them ask is not a bad idea. You certainly wouldn’t want to lead by offering money. That’s a really bad idea.
Border agents rank higher than airport security on the dubious practices list. Be ready when crossing borders. Delays are common and often you will not know exactly what they want. We were once delayed on a border overnight because the border agents were working in collusion with the hotels and restaurants. You have to figure out what they have in mind. Do they want a tip? Do they think you pose a threat? Are they working on some sort of quota? Are they flaunting their power? Did the person who passed ten minutes ago put them in a bad mood? The possibilities are endless. Showing respect and patience is the best way to keep the shenanigans to a minimum.
If you have the opportunity, ask a fellow traveler what to expect at the border. The best practice, perhaps, is to create the smallest impact possible. Answer questions, follow directions, and when you wait, wait patiently. If you play by the rules, you will most often move right through the checkpoints.