I can totally understand the need to protect your citizens, but I rather think that this kind of behaviour damages the reputation of the US deeply. In the long run, you might have gotten your hands on someone's data that would like to harm the US (but are these guys so stupid to put their malicious plans on a handheld device they use at border crossing?)
Actually after the Snowden revelations: aren't the three letter agencies able to access our data without us knowing it anyways? If we are on their radar, they can get whatever info they want from us anyway. That's my understanding. So why harrass the normal person crossing the border?
Since the border has become such a focal point of our political conscious, the culture of some of these agencies is really being brought to light. Just look at the private Facebook groups of current and former CBP agents comparing migrants to animals and whatnot.
When the culture of an agency gets toxic, you start to see enablement of this kind of behavior.
Actually after the Snowden revelations: aren't the three letter agencies able to access our data without us knowing it anyways? If we are on their radar, they can get whatever info they want from us anyway. That's my understanding. So why harrass the normal person crossing the border?