There is no valid reason for ever patting down a passenger at the gate unless law enforcement has placed them under arrest. They're already in the sterile are and at that point, it's time to let go and trust the screening checkpoint. Anyone at the TSA who thinks this is acceptable behaviour should be promptly be shipped off to North Korea. Treating fellow Americans this poorly should result in pebble-infested rice and hard labor for 40-50 years.