Re: "visitors to the USA have very few, if any, rights at the border or airports and can be denied entry for the slightest of reasons"

That is basically true at any international border crossing. They can say, do or ask anything they want to. And, they have the power to look up your bum too, if they feel so inclined.

I disagree with Justsayingmeh - it isn't "exactly how it should be done!" Not in civilized countries, anyway.