The thing you have to understand about the border control area at airports is that it's kind of a "no man's land." Despite technically being on US soil, you aren't considered inside the borders of the US. You go inside only when the immigration officer gives you the green light. Until then, they can basically do anything they want to you, and there isn't anything you can do about it.